class_docstr: The class used to define vectors.
  
  It along with ReferenceFrame are the building blocks of describing a
  classical mechanics system in PyDy and sympy.physics.vector.
  
  Attributes
  ==========
  
  simp : Boolean
      Let certain methods use trigsimp on their outputs
class_docstr_tok: ["The","class","used","to","define","vectors",".","It","along","with","ReferenceFrame","are","the","building","blocks","of","describing","a","classical","mechanics","system","in","PyDy","and","sympy.physics.vector",".","Attributes","==========","simp",":","Boolean","Let","certain","methods","use","trigsimp","on","their","outputs"]
docstr: Returns the matrix form of the vector with respect to the given
  frame.
  
  Parameters
  ----------
  reference_frame : ReferenceFrame
      The reference frame that the rows of the matrix correspond to.
  
  Returns
  -------
  matrix : ImmutableMatrix, shape(3,1)
      The matrix that gives the 1D vector.
  
  Examples
  ========
  
  >>> from sympy import symbols
  >>> from sympy.physics.vector import ReferenceFrame
  >>> a, b, c = symbols('a, b, c')
  >>> N = ReferenceFrame('N')
  >>> vector = a * N.x + b * N.y + c * N.z
  >>> vector.to_matrix(N)
  Matrix([
  [a],
  [b],
  [c]])
  >>> beta = symbols('beta')
  >>> A = N.orientnew('A', 'Axis', (beta, N.x))
  >>> vector.to_matrix(A)
  Matrix([
  [                         a],
  [ b*cos(beta) + c*sin(beta)],
  [-b*sin(beta) + c*cos(beta)]])
docstr_tok: ["Returns","the","matrix","form","of","the","vector","with","respect","to","the","given","frame",".","Parameters","--","--","--","--","--","reference_frame",":","ReferenceFrame","The","reference","frame","that","the","rows","of","the","matrix","correspond","to",".","Returns","--","--","--","-","matrix",":","ImmutableMatrix",",","shape","(","3,1",")","The","matrix","that","gives","the","1D","vector",".","Examples","========",">",">",">","from","sympy","import","symbols",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",">",">",">","a",",","b",",","c","=","symbols","(","'","a",",","b",",","c","'",")",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","vector","=","a","*","N.x","+","b","*","N.y","+","c","*","N.z",">",">",">","vector.to_matrix","(","N",")","Matrix","(","[","[","a","]",",","[","b","]",",","[","c","]","]",")",">",">",">","beta","=","symbols","(","'beta","'",")",">",">",">","A","=","N.orientnew","(","'","A","'",",","'Axis","'",",","(","beta",",","N.x",")",")",">",">",">","vector.to_matrix","(","A",")","Matrix","(","[","[","a","]",",","[","b","*","cos","(","beta",")","+","c","*","sin","(","beta",")","]",",","[","-b","*","sin","(","beta",")","+","c","*","cos","(","beta",")","]","]",")"]
code: def to_matrix(self, reference_frame):
      """Returns the matrix form of the vector with respect to the given
      frame.
  
      Parameters
      ----------
      reference_frame : ReferenceFrame
          The reference frame that the rows of the matrix correspond to.
  
      Returns
      -------
      matrix : ImmutableMatrix, shape(3,1)
          The matrix that gives the 1D vector.
  
      Examples
      ========
  
      >>> from sympy import symbols
      >>> from sympy.physics.vector import ReferenceFrame
      >>> a, b, c = symbols('a, b, c')
      >>> N = ReferenceFrame('N')
      >>> vector = a * N.x + b * N.y + c * N.z
      >>> vector.to_matrix(N)
      Matrix([
      [a],
      [b],
      [c]])
      >>> beta = symbols('beta')
      >>> A = N.orientnew('A', 'Axis', (beta, N.x))
      >>> vector.to_matrix(A)
      Matrix([
      [                         a],
      [ b*cos(beta) + c*sin(beta)],
      [-b*sin(beta) + c*cos(beta)]])
  
      """
  
      return Matrix(
          [self.dot(unit_vec) for unit_vec in reference_frame]
      ).reshape(3, 1)
  
imports: from sympy import S, sympify, expand, sqrt, Add, zeros, acos, ImmutableMatrix, simplify
  from sympy.simplify.trigsimp import trigsimp
  from sympy.printing.defaults import Printable
  from sympy.utilities.misc import filldedent
  from sympy.core.evalf import EvalfMixin
  from mpmath.libmp.libmpf import prec_to_dps
label_desc: Use image node_id 24 for calling the Vector obj's underlying member method code with example usage: obj.to_matrix(reference_frame) and returns: Matrix