Reshapes a one-dimensional vector into a matrix
The vector to reshape
The number of rows in the resulting matrix
The number of columns in the resulting matrix
A new rows×cols matrix
Error if the vector length doesn't match rows × cols
Reshapes a one-dimensional vector into a matrix