Reshapes a matrix according to a certain number of dimensions
Usage
reshape(A, sz)
Value
the input matrix, reshaped according to the vector sz
Arguments
A
input matrix
sz
vector containing the dimensions of the output vector
Details
This function replicates the functionality of the reshape()
function on Matlab. This function is basically a fancy wrapper for the
array() function in R, but is useful because it saves the user translation
time. Moreover, it introduces validation code that alter the behavior of
array() and makes it more similar to replicate().