Greetings,
I would like to obtain the permutation resulting from the sorting of the given list (as opposed to the sorted list):
input = {5.3, 2.7, 9.2, 0.0} output = {0.0, 2.7, 5.3, 9.2} Desired Output = {4, 2, 1, 3}
Thanks in advance
Ordering does this.
Ordering
In[17]:= input = {5.3, 2.7, 9.2, 0.0}
Out[17]= {5.3, 2.7, 9.2, 0.}
In[18]:= Ordering[input, 4]
Out[18]= {4, 2, 1, 3}