MATLAB: Reshape of multidimesion matrix to single dimension matrix.

reshape

I have matrix C with 7 rows and 3 columns. C=[1 0 0;4 2 0;7 5 3;10 8 6;13 11 9;0 14 12;0 0 15] Can i reshape this matrix to one dimension ?

Best Answer

C(:)
or
C(:).'
or
reshape(C, [], 1)
or
reshape(C, 1, [])