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

Home » Public Forums » archive » Filtering out NaNs
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: Filtering out NaNs [message #8643 is a reply to message #8528] Fri, 21 March 1997 00:00 Go to previous message
Christian Marquardt is currently offline  Christian Marquardt
Messages: 7
Registered: August 1996
Junior Member
Peter Webb wrote:
>
> Stein Vidar Hagfors Haugan (steinhh@rigil.uio.no) wrote:
>
> : NaNs are characterized by the fact that they are *not* equal
> : to any number (that's what it says, isn't it :-)
>
> : In fact, it's not even equal to itself - and this is the distinguishing
> : feature that must be used to pick them out. I.e.,
>
> : a(where(a ne a)) = missing_flag
>
> I'd like to hereby nominate Stein for the "Cool Tip of the Week" award!

Well - it will result in an error message from IDL if there are _no_
NaN's or +/-Infinites in that array. Better try something like

idx = where(a ne a) & if idx(0) ne -1 then a(idx) = missing_flag

or

idx = where(finite(a) ne 1) & if idx(0) ne -1 then a(idx) =
missing_flag

I wonder if there's a way to use where without checking if the
condition was met at all, given that you do not know this in
advance.

Regards,

Chris.


------------------------------------------------------------ ------------
Christian Marquardt

Meteorologisches Institut der | tel.: (+49) 30-838-71170
Freien Universitaet Berlin | fax.: (+49) 30-838-71167
Carl-Heinrich-Becker-Weg 6-10 | email:
marq@strat01.met.fu-berlin.de
D-12165 Berlin |
------------------------------------------------------------ ------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: RSI and the 24. Tagname...
Next Topic: ANY LINUX IDL USERS?

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

Current Time: Fri Oct 10 10:29:28 PDT 2025

Total time taken to generate the page: 0.80449 seconds