MATLAB: Elegant way of “sending to the next row” in a matrix

matrixresizingrow

Hello,
I have a 1×36 matrix that I want to cut in bits. In my specific case I want to obtain a 6×6 matrix from this 1×36 matrix. Every 6 column of the original 1×36 matrix I want to go to a next row.
How can I do this in an elegant way?
Thanks!

Best Answer

I have not the same result and using a transpose I think that I get what you want.
A=1:10;
B=reshape(A, [5,2])'
So, B =
1 2 3 4 5
6 7 8 9 10