comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How do you sort an array in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How do you sort an array in IDL? [message #11423] Mon, 06 April 1998 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Robert A. Lematta wrote:
>
> Does anyone know how to sort an array in idl (ala excell) while preserving
> the order of the other columns. For example, if I have a 10 by 10 array
> with the second column being time, how do I sort the entire array by time and
> have the values in the other columns follow. Like you'd do a sort in a
> spreadsheet. Please reply to lematta@spawar.navy.mil. Many thanks in advance.
> I've tried to figure out the sort function but I don't think it works on arraysswith more than one row or column.
>

Robert,

if you are looking for a sort algorithm similar to what you can do
with spreadsheets, you may want to try my w_sort.pro widget (or the
"multisort" procedure therein): this lets you sort an array keyed on one
or several variables (columns). You can find it on my web page, URL
listed below (it will be posted there by tomorrow).

Regards,
Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Write-mask problem with "win" device?
Next Topic: drawing a shaded sphere

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 21:36:21 PDT 2025

Total time taken to generate the page: 0.55856 seconds