MATLAB: How to reshape this matrix reshape A = [ 1 2 3 4 5 6 7 8 9 10; 11 12 13 14 15 16 17 18 19 20;] I want reshape to 1 2; 3 4; 5 6; 7 8; . . . 19 20; thank you sir. Best Answer result = reshape(A.',2,[]).' Related SolutionsMATLAB: How to do the following in a simpler and smarter way C=repmat(1:21,12,1)C=C(:)'%orC=1:21;C=reshape(C(ones(12,1),:),1,[]) MATLAB: How to reshape a 2D to 3D matrix without using loops (reshape) and keeping a particular order of the elements// Wrong arragement of elemts after using “reshape” A=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]A2=permute(reshape(A',4,4,[]),[2 1 3]) Related QuestionReshapeHow to sort a matrix in a random orderReshapingRepeating blocks of N rows M timesMatrix reshapingReshape 3d matrix to obtain a column vector
Best Answer