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

Home » Public Forums » archive » Re: Search routines
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: Search routines [message #12831 is a reply to message #12829] Fri, 18 September 1998 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Kenneth P. Bowman wrote:
> IDL has a pretty good SORT routine, but no SEARCH routine that I have been
> able to find (that is, a procedure to find the index of the closest/first
> match in an ordered list). Once again, this can be done with loops, but
> such an implementation would almost certainly be much slower than a
> built-in function. Since searching and sorting are such basic operations,
> does anyone know why there is no SEARCH in IDL?

How about the MIN function, e.g.

array = findgen(100)
value = 37.2
result = min( abs( value - array ), location )
help, location

Cheers,
Liam.

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
1225 W. Dayton St., Madison WI 53706, USA
Phone (608) 265-5358, Fax (608) 262-5974
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Cumulative total
Next Topic: Re: Multiple plot windows

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

Current Time: Fri Oct 10 16:02:11 PDT 2025

Total time taken to generate the page: 0.07933 seconds