I have two matrices A and B with n number of rows and 4 columns. The 2nd and third column of both matrices are same but not the order. I would like to arrange the matrix B with respect to the order of 2nd and third column in matrix A.
A = [ 1 2 3 4.1; 5 12 7 4.1; 9 10 11 4.1];
B = [ 131 10 11 8.1; 21 12 7 8.1; 91 2 3 8.1];
so B sorted should look like,
Bsorted = [91 2 3 8.1; 21 12 7 8.1; 131 10 11 8.1]
Thanks
Best Answer