MATLAB: Do a matrix,array

matrix arraymatrix manipulation

I have a matrix A=[5 4 3; 1 8 2; 6 9 7] and i want to insert it into one array B=[5 4 3 1 8 2 6 9 7].How i will do it?

Best Answer

This works:
B = reshape(A', 1, []);