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

Home » Public Forums » archive » the NaN effect :-|
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
the NaN effect :-| [message #54397] Tue, 12 June 2007 08:33 Go to previous message
rkombiyil is currently offline  rkombiyil
Messages: 59
Registered: March 2006
Member
This stumps me.. We had some discussions on NaN's earlier, but mostly
wrt 'TOTAL'
Lets say,
IDL>a=[6.2,12.5,14.1,0.,22,!values.f_nan]
IDL> print,max(a)
22.0000
IDL> print,min(a)
0.00000

; Now I increase number of NaN's in the array :D

IDL> a=[6.2,12.5,14.1,0.,!values.f_nan,22,!values.f_nan]
IDL> print,max(a)
22.0000
IDL> print,min(a)
0.00000

; go on, repeat this (it is 00:23 where I am @, so CARPE NOCTEM! ) :-P

IDL> a=[!values.f_nan,6.2,12.5,14.1,0.,!values.f_nan,22,!values.f _nan]
IDL> print,min(a)
NaN
IDL> print,max(a)
NaN
============================================
Same goes for MIN also. ??!!

IDL's docu says:
<snip from IDL ref guide: Page 1269/4090>
If the MAX function is run on an array containing NaN values and the
NAN keyword is not set, an invalid result will occur.
</snip>
The same is said for MIN also.

So the result (OPS with MIN/MAX) is directly proportional to the
number of NaN's we eat? er, add to the array? :P

So what is right and what is wrong? Enlighten, please.
/metachronist
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL plot axes - how to show "range missing" squiggle?
Next Topic: defining a data structure

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

Current Time: Fri Oct 10 13:31:10 PDT 2025

Total time taken to generate the page: 0.80197 seconds