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]);?