MATLAB: Convert a column vector to an array matrix

matrix manipulationvector

Hi, Suppose, I have a 500×1 column vector How do I convert it into a 25×20 array matrix where 1st column values of the matrix will be 1st 25 values of the vector and so on.

Best Answer

Use the reshape command.
M = reshape(V,25,20)