MATLAB: How to change two columns of a matrix columnmatrix Hello,everyone If i have a matrix A with dimension of 200*14. How can I switch column 2 with column 13? Thanks. Best Answer A(:,[i,j])=A(:,[j,i]);? Related SolutionsMATLAB: How to split a column into many equal columns Try this:newMatrix = reshape(originalMatrix, [], desiredNumberOfColumns); MATLAB: Changing block row matrix to block column matrix [EDIT]B = 2; % the number of blocks [m,n] = size(c);out = reshape(permute(reshape(c,m,n/B,[]),[1,3,2]),m*B,[]); Related QuestionRepeat last row at the end of matrixHow to change matrixMatrix row/column augmentationHow to change column values from a matrixHow to build ratio between two columns of a matrix
Best Answer