MATLAB: Convert row or coloumn matrix into rowXcoloumn matrix

MATLABmatrix arraymatrix manipulation

Hi
I need to convert row matrix
row_matrix.PNG
into
changed.PNG
How to convert like this. I am struck with logic.

Best Answer

I would do it as such:
P = 1:10;
out = reshape(P,[2,5]);
out = out'; % Take transpose