Identifying NaN data
eckj
For example I would like to use data from a wave unless it is NaN, in which case I'd like to input a constant number instead. The following syntax doesn't compile..
if (Wave1[f] == "NaN")
Variable1 = 13
else
Variable1= Wave1[f]
Thx
Variable1 = 13
else
Variable1 = Wave1[f]
endif
IEEE defines comparison with NaN to always return false, no matter what. So you have to use numtype() to find out if it's NaN.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 27, 2011 at 02:29 pm - Permalink