correlation and NaN [message #55853] |
Wed, 19 September 2007 00:08 |
WRC2008
Messages: 14 Registered: September 2007
|
Junior Member |
|
|
Dear,
I would like to caclulate correlation factors from arrays which also
contains NaN values. Now, i checked some newsgroups and got answers
like this:
indices =[where( finite(Var1) eq 1),where( finite(Var2) eq 1)]
common_indices = indices(UNIQ(indices, sort(indices)))
Result = CORRELATE( Var1(common_indices), Var2(common_indices))
or with the another command (get_intersection?? - sorry, forgot the
right name, and can find it back anymore...)
The first doesn't seems to work in my case (r² = NaN), and the second
is not recognized in my IDL 5.6 version.
For the first method, maybe it is because one array doesn't contain a
NaN value???
Can anybody help me with this?
Thank you,
Best Regards,
Matthias
|
|
|