Return a matrix with the given dimensions whose elements are taken from the matrix a. The elements of the matrix are accessed in column-major order (like Fortran arrays are stored).
For example,
reshape ([1, 2, 3, 4], 2, 2) 1 3 2 4Note that the total number of elements in the original matrix must match the total number of elements in the new matrix.
A single dimension of the return matrix can be unknown and is flagged by an empty argument.