![]()  | 
  
    Stan Math Library
    5.1.0
    
   Automatic Differentiation 
   | 
   
      
  | 
  inline | 
Returns a matrix representation of the vector or matrix in column-major or row major order with the specified number of rows and columns.
| T_x | type of the matrix | 
| x | matrix | 
| m | rows | 
| n | columns | 
| col_major | column-major indicator if 1, output matrix is transversed in column-major order if 0, output matrix is transversed in row-major order | 
| <code>std::invalid_argument</code> | if the sizes do not match | 
Definition at line 70 of file to_matrix.hpp.