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

Home » Public Forums » archive » Re: How to find second minimum elements in 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 to find second minimum elements in an array in IDL? [message #64673 is a reply to message #64672] Wed, 14 January 2009 07:41 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
> Or one could use sort to find the value:
> IDL> xs=x[sort(x)]
> IDL> xu=uniq(xs)
> % Compiled module: UNIQ.
> IDL> ind=where(xu eq 1)
> IDL> print, xu[1]
>            1

Oops amend this, I got the uniq output wrong in my head, the second
minimum is xu[1] and first is xu[0]

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Transparency in object_graphics
Next Topic: question about array interpolation

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

Current Time: Wed Oct 08 18:09:22 PDT 2025

Total time taken to generate the page: 0.00460 seconds