MATLAB: Column and row rearrangement

row column arrangement

How to rearrange column and row matrix?For example, I have 10×10 matrix size. I want to move the 10th column and row into 1st column and row.Then,1st column and row will move to 2nd column and row. 2nd row and column will move to 3rd column and row. And also, repeat for next column and row.

Best Answer

Use the circshift function. With it, you can do everything you seem to describe wanting to do with your matrix.