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

Home » Public Forums » archive » NaN doesn't work!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
NaN doesn't work! [message #93350] Mon, 20 June 2016 15:11 Go to previous message
Libo Wang is currently offline  Libo Wang
Messages: 6
Registered: October 2009
Junior Member
Hi, I have an array with negative numbers (-99.0) representing invalid values. I need to use Total to do some calculation, so I'm converting the invalid values to NaN first:

print,data[60,31,1]
bad=where(data lt 0.0,cbad)
if cbad gt 0 then data[bad]=nan
print,data[60,31,1]

I've got -99.0 from both the print line!! Anybody knows why? I thought I knew how to do some simple IDL coding, now I'm not sure!

Thanks in advance!
Jenny
[Message index]
 
Read Message
Read Message
Previous Topic: Moment and XROI
Next Topic: WHERE command returning -1 even if matching is there

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

Current Time: Wed Oct 08 09:09:13 PDT 2025

Total time taken to generate the page: 0.00397 seconds