MATLAB: I want to convert matrix into vector

matrix manipulation

I want to convert matrix into vector.I have a matrix which contain noise of 434 images. The size of the noise is 512*512*434 i want to convert this into a vector that is 262144*434 .
How is this possible.Pls reply,Thanks in advance.

Best Answer

a - your array [512 x 512 x 434]
out = reshape(a,[],size(a,3))