MATLAB: How to convert 2-D array to 1-D array

arraymatrixmatrix array

how to convert 2-D array of dimension n*m to 1-D array with length (n*m) if a=[1 2 3;4 5 6;7 8 9] i want a = [1 2 3 4 5 6 7 8 9] so how

Best Answer

transpose then reshape

a = reshape(a.', 1, [])