- HasNan
- Transpose
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Compare
- CompareByDigits
- Flat
- Clip
- Reshape
- Resize
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
Reshape
Change the shape of a matrix without changing its data.
void Reshape(
|
Parameters
rows
[in] New number or rows.
cols
[in] New number or columns.
Note
The matrix is processed in place. No copies are created. Any size can be specified, i.e., rows_new*cols_new!=rows_old*cols_old. When the matrix buffer is increased, the extra values are undefined.
Example
matrix matrix_a={{1,2,3},{4,5,6},{7,8,9},{10,11,12}};
|