What is an elegant way of reordering rows and columns of matrix when given a new order.
Ex:
A is 3 X 3 matrix
If the new order is [2 1 3], then I want to change A such that
1st row of A_New = 2nd row of A2nd row of A_New = 1st row of A3rd row of A_new = 3rd row of Aand 1st column of A_New = 2nd column of A2nd column of A_New = 1st column of A3rd column of A_new = 3rd column of A
Best Answer