MATLAB: Rearrange matrix into single row MATLAB Hey there, I have a matrix that looks like this b=1 2 3 4 1 2 3 4 1 2 3 4 What do I have to do to arrange it into a single row vector[ 1 2 3 4 1 2 3 4 1 2 3 4]? Best Answer reshape(b',1,numel(b)) % Note the transpose ('), this is important.Paul Shoemaker http://www.matlabinvesting.com Related SolutionsMATLAB: Re-arrange vectors from rows to columns A = [1 1 1 1 1 1 1 1 1 1];B= [2 2 2 2 2 2 2 2 2 2 ] ;C= [3 3 3 3 3 3 3 3 3 3];A=A';B=B';C=C';D=[A B C] MATLAB: Array rearrangement A = A(:); %column-wise extractivonor for more fancy manipulations:doc permutedoc transposedoc reshape Related QuestionReshape a matrix into vector using rowsHow to multiply a vector 3 times to get a 3 dimentional matrixRearranging matrices horizontally rather than vertically
Best Answer