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

Home » Public Forums » archive » NaN problems
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: NAN Problem [message #69398 is a reply to message #43584] Wed, 13 January 2010 13:00 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Wed, 13 Jan 2010, David Fanning wrote:

> Consider this sequence of commands on my IDL 7.0.1
> LINUX version.
>
> IDL> a = Findgen(11)
> IDL> a[0] = !Values.F_NAN
> IDL> Print, Min(a), Max(a)
> NaN NaN
> IDL> b = Findgen(11)
> IDL> b[1] = !Values.F_NAN
> IDL> Print, Min(b), Max(b)
> 0.00000 10.00000
>
> What do you make of that? This is giving me a great
> deal of touble today while trying to elminate bad
> values from an image. :-(
>

The first array element causes the difference. You can reproduce the
results:

min=a[0]
max=a[0]
for j=1,10 do begin
if a[j] lt min then min=a[j]
if a[j] gt max then max=a[j]
endfor


lt and gt are not defined for NaNs, they always return 0:

x=0.0
y=!Values.F_NAN
help, x lt y, x eq y, x gt y

<Expression> BYTE = 0
<Expression> BYTE = 0
<Expression> BYTE = 0


regards,
lajos
[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
Previous Topic: NAN Problem
Next Topic: Re: aggregate pixel values within shapes or another raster

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

Current Time: Sat Nov 29 14:43:45 PST 2025

Total time taken to generate the page: 0.64112 seconds