MATLAB: Swap columns of a matrix

column swapMATLAB

Hello guys/girls
How do i swap columns??
I have this
k_minus =
-46 -43 -26 -14 7 19 11 32 39 45 45
0 -4 -7 -7 -44 -44 -7 -7 -15 -15 0
and I want the columns to be in opposite order – How do I do this? and can do this in one go?

Best Answer

You could also use
out= fliplr(k_minus)