Consider the following 3 x 3 matrix A:
5 8 34 8 19 6 8
Consider the following 3 x 3 matrix B:
3 1 22 3 11 3 2
The rows of B contain the desired indexes of the rows of A. My goal is to create the matrix C:
3 5 88 1 49 8 6
So the rows of A are reshuffled according the indices in B. Any ideas on how to do this, preferably without loops?
Best Answer