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

Home » Public Forums » archive » Re: Sky is falling, maybe?
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: Sky is falling, maybe? [message #68232 is a reply to message #68231] Thu, 08 October 2009 12:04 Go to previous message
JohnSmith is currently offline  JohnSmith
Messages: 4
Registered: September 2009
Junior Member
"Lasse Clausen" <lbnc@lbnc.de> wrote in message
news:771d3ad1-2210-4252-87ad-10af20c3f397@m1g2000vbi.googleg roups.com...
> I find the following odd but maybe the sky is just falling and one of
> you guys can explain why this happens. Try running
>
> power = randomu(1001, 150)
> power[77+lindgen(10)*3] = 1e+7
> help, where(~finite(power))
> plot, power, yrange=[.1, 10]
> loadct, 12
> oplot, smooth(power, 12, /nan), thick=3, color=20
> oplot, smooth(power, 12), thick=3, color=120
> end
>
> On my machine
>
> IDL> print, !version
> { x86_64 linux unix linux 7.0 Oct 25 2007 64 64}
>
> I see a distinct difference in the SMOOTH output after the very uppy-
> downy bit of the data. It seems the documentation should be changed
> from
>
> SMOOTH should never be called without the NAN keyword if the input
> array may possibly contain NaN values.
>
> to
>
> SMOOTH should never be called without the NAN. Period.


my guess, and I have not thought hard about it, is that
the NAN keyword forces smooth to work in double precision internally.


Note: the difference goes away if you put a
power = double(power)

right after the randomu() call.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sky is falling, maybe?
Next Topic: Re: Nearest neighbors

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

Current Time: Wed Oct 08 17:28:34 PDT 2025

Total time taken to generate the page: 0.00437 seconds