SMOOTH function doesn't replace the values of NaN [message #90159] |
Wed, 04 February 2015 02:37  |
atmospheric physics
Messages: 121 Registered: June 2010
|
Senior Member |
|
|
Hello,
I am applying the SMOOTH function to my time series data, which contains 'NaN's in between. By including the /NAN keyword, the SMOOTH function shall consider NANs within the data and replace with a smoothed value. I don't see replacement of NaNs with a numerical value. Did I understand wrongly?
Thanks in advance,
Madhavan
|
|
|
Re: SMOOTH function doesn't replace the values of NaN [message #90160 is a reply to message #90159] |
Wed, 04 February 2015 02:42  |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
Hi,
On 04.02.2015 11:37, Madhavan Bomidi wrote:
> I don't see replacement of NaNs with a numerical value
can you provide a use-case? For me it works:
IDL> a = FINDGEN(3,3)
IDL> a[1,1] = !VALUES.F_NAN
IDL> print, smooth(a, 2, /NAN)
0.00000 1.00000 2.00000
3.00000 4.00000 5.00000
6.00000 7.00000 8.00000
|
|
|