MATLAB: Changing the Structure of a Matrix.

matricesmatrixmatrix arraymatrix manipulation

Hi,
If I have a matrix of lets say [4×3] i.e
1 2 3
4 5 6
7 8 9
10 11 12
how can I change this to a [12×1] matrix i.e
1 2 3 4 5 6 7 8 9 10 11 12
Thanks.

Best Answer

y = reshape(x.',1,[])