MATLAB: Reshape – columnwise. any command to linewise

reshape

help reshape
RESHAPE Reshape array.
RESHAPE(X,M,N) returns the M-by-N matrix whose elements are taken columnwise from X.
I need some way to turn a matrix linewise instead.

Best Answer

reshape(X.',M,N).'