qsort

From: Stephanie Slade <sslade1_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 11 2010 - 14:49:13 MST

Is there a way to use qsort (or any other method really) but keep the
original indices? I need to be able to keep it for a "time" index so
that I can sort another corresponding dataset accordingly. I know this
is confusing, so I'll make up an example of what I mean.
Say I have:

[-4, 5, 3, -2, 1] which temporally corresponds to [7, 2, 1, 10, -3] and
I need the first one to be [-4, -2, 1, 3, 5] but I need the index so
that I can rearrange the second corresponding array to be [7, 10, -3, 1, 2]

Thank you!
Steph
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 11 14:49:24 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 15 2010 - 08:55:22 MST