MATLAB: How to swap columns of matrix zeros(2,n)

swap columns

Hello everyone
I'm working on one project which in need to swap all the columns of the matrix zeros(2,n) which i want to swap the first column with last column, second with second column from last, third column from third column from last and so on can anybody help me with it thank you.

Best Answer

  • From your description, the fliplr function would work.