qsort

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 08 2013 - 16:44:41 MDT

Hi,

I would like to use the function "qsort" to sort one array and then sort
several other arrays based on how the first array was sorted. Here is the
idea:

a = (/1,2,3/)
b = (/8,3,7/)
qsort(b)
print(b)
> 3,7,8
...
is there a way to save the indices of the sorted b to then sort a such that:
print(a)
> 2,3,1

Appreciate any help with this.
/M

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 8 16:44:50 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT