I am having trouble sorting a 3D matrix by whichever row I want, but still having the other two columns match up with the one sorted row.
ex)before sort:
5 4 1
4 6 3
9 6 5
after sort:
1 4 5
3 6 4
5 6 9
So only the first row got sorted in ascending order, the other two rows simply stayed in their respective columns.
I have tried sort(Matrix(1,:,:)), but this seems to sort all three rows.I'm guessing there is some matlab function that can do this, but I haven't found anything. Thanks