[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NaN values



Hi all

I need your expertise.

I have two vectors (vec1 and vec2). Some of the values of vec1 are set
as NaN. I want to sum each point of vec1 with its correspondent point in
vec2, ignoring NaN.

If I just use:

new_vec=vec1+vec2, I have NaN's in the new_vec correspondent point to
vec1.

If I use "total" (new_vec=total(vec1,vec2,/nan)  IDL tells me that
should be a scalar in the context.

Is there any other way to ignore the NaN's?

Thanks a lot.

Antonio

--
--------------------------------------------
Antonio Caetano Vaz Caltabiano
Southampton Oceanography Centre
School of Ocean and Earth Science
European Way
Southampton - UK
SO14 3ZH
Phone: +44-(0)23-80596488
Fax: +44-(0)23-80593059
--------------------------------------------