help-octave
[Top][All Lists]
Advanced

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

Re: replacing NaN


From: david barnes
Subject: Re: replacing NaN
Date: Tue, 24 Apr 2001 14:35:49 +0100
User-agent: Mozilla/5.0 (X11; U; Linux 2.2.16 i686; en-GB; m18) Gecko/20010131 Netscape6/6.01

thanks  Przemek ,

but doens't this need treatment to work
if [a] is a matrix and not a vector?

I suppose it works line-by-line
and that's how I read the data in anyway --
I'll give it a shot ...
depends if it's faster than a strrep ...

Przemek Klosowski wrote:

I think this is what you are looking for

a=[1,2,3,NaN,5,6,Inf] 1 2 3 NaN 5 6 Inf
a(isnan(a))=0
     1    2    3    0    5    6  Inf

thanks again,
David

--
David DS Barnes MED | Imperial College | Exhibition Rd | London sw7 2bx
t/f:0207 594 7181/7127

tap vein, mine deep, share gold






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]