Sort a matrix
All,
Is there a way to achieve functionality similar to what is shown below : A = [10 -12 4 8; 6 -9 8 0; 2 3 11 -2; 1 1 9 3] Upon sorting, how can i retain the original positions of the elements ? For e.g. if i wanted to sort each column of the matrix, I can only think of doing the following: for(i = 1, i <= N cols(A), i ++,
t = A[0,i];
t1 = sort descending(t);
...