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

Home » Public Forums » archive » Re: where() and IEEE NaN
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() and IEEE NaN [message #17807 is a reply to message #17803] Fri, 05 November 1999 00:00 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
badastro@smart.net (Philip Plait) writes:

> In article <7vv1j3$6ro$1@ra.nrl.navy.mil>,
> Todd Bowers <tbowers@nrlssc.navy.mil> wrote:
>> IDL> a = [1,2,!Values.F_NaN,4,!Values.F_NaN]
>> IDL> print, a
>> 1.00000 2.00000 NaN 4.00000 NaN
>> IDL> print, where(a EQ !Values.F_NaN)
>> 0 1 2 3 4
>>
>> Hmmmmmm.... is this a known feature? The where() help says
>> nothin' about NaN's.
>> IDL v5.2a

> Incidentally, if you are looking for the element numbers
> of where a = NaN, try:

> IDL> print,where(a-a ne 0)
> 2 4


Isn't it simpler (and faster) to say

IDL> print,where(a ne a)

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Center of mass???
Next Topic: Re: contour plots on walls of a cube

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

Current Time: Wed Oct 08 19:03:34 PDT 2025

Total time taken to generate the page: 0.00418 seconds