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

Home » Public Forums » archive » Re: sorting string arrays - non alphabetic and user defined order
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: sorting string arrays - non alphabetic and user defined order [message #50652] Mon, 16 October 2006 05:03 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Try this...


namelist=['Daddy','Groggy','Ally','Curry','Emmy','Bully','Jo ckey','Hippy','Itchy','Fluffy']
mylist=['Emmy','Fluffy','Itchy','Jockey']
n=n_elements(namelist)
m=n_elements(mylist)
q1=rebin(transpose(indgen(m)),n,m)
q2=rebin(indgen(n),n,m)
s=mylist[q1] eq namelist[q2]
print,namelist[where(total(s,2) gt 0)]

regards,
Greg
[Message index]
 
Read Message
Read Message
Previous Topic: IDL's built-in function DILATE and ERODE doesn't work as described in help
Next Topic: Segmentation fault: IDL 6.3 on Debian SID

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

Current Time: Wed Oct 08 20:11:04 PDT 2025

Total time taken to generate the page: 0.00232 seconds