MATLAB: Create a matrix with specif size

MATLABmatrix arraymatrix manipulation

Hi MATLAB community,
I have a array with the size (360×1), I would like to organize into a matrix with sizes (30 rows and 12 columns) using the data available on the array, organize sequencially. Which the function I can use for made this?
Thank you very much
Guilherme

Best Answer

See reshape()
B = reshape(A, 30, 12); % A is 360x1 and B is 30x12
It will organize the data column-wise, i.e., fill the first column, then second, and so on.