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);
); Now, how can I determine the original position of the elements and retain them ?
https://www.mathworks.com/help/matlab/ref/sort.html - In Matlab, there is a second argument to the sort function which returns the index
Similarly in R, you can retain the index. Wondering what is the best way to do that in JMP ?