[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NaN values
- Subject: Re: NaN values
- From: "Klaus Scipal" <kscipal(at)ipf.tuwien.ac.at>
- Date: Tue, 27 Feb 2001 14:52:27 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: Vienna University of Technology, Austria
- References: <3A9B9192.4BF0302@soc.soton.ac.uk>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23713
try
new_vec=[[vec1],[vec2]]
new_vec=TOTAL(new_vec,2,/nan)
klaus
Antonio Caetano Vaz Caltabiano <caetano@soc.soton.ac.uk> wrote in message
3A9B9192.4BF0302@soc.soton.ac.uk">news:3A9B9192.4BF0302@soc.soton.ac.uk...
> 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
> --------------------------------------------
>
>