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

Home » Public Forums » archive » Where the heck is the IDL Virtual Machine?
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: Where [message #63084 is a reply to message #63078] Tue, 28 October 2008 10:28 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
On Oct 28, 5:48 am, silviad...@gmail.com wrote:
> Hallo!
> Why IDL returns -1 when i do:
> where(array eq 0.785)?
> Array elements are not zero!
> Thank you!

This is the as advertised behavior, -1 is the index that matches your
query (meaning none match)

Try this for some insight
a=findgen(10)
ind=where(a eq 2.4, n_ind)
print, a, ind

and you get -1, 0. Meaning no elements in a are equal to 2.4 since
they are 0,1,2,3,4,5,6,7,8,9.

Make sense?



Cheers,

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
Previous Topic: matrix multiplication
Next Topic: Re: Where the heck is the IDL Virtual Machine?

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

Current Time: Sat Oct 11 09:48:12 PDT 2025

Total time taken to generate the page: 0.23867 seconds