help-octave
[Top][All Lists]
Advanced

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

Re: near zero value replaced by zero


From: PhilipNienhuis
Subject: Re: near zero value replaced by zero
Date: Thu, 17 Mar 2016 06:03:44 -0700 (PDT)

Carlo de Falco-2 wrote
> On 17 Mar 2016, at 10:42, prasadmehendale <

> microteacher@

> > wrote:
> 
>> Hi,
>> I used a function "clean" in Scilab. It makes a matrix element zero if
>> less
>> than 1e-10. is there any equivalent function in gnu octave?
>> Thanks.
>> --pm
> 
> a (a < 1e-10) = 0;

Just FTR, shouldn' t it rather be

a (abs (a) < 1e-10) = 0;

?
I know the OP didn't ask for it but it' s a common pitfall.

Philip



--
View this message in context: 
http://octave.1599824.n4.nabble.com/near-zero-value-replaced-by-zero-tp4675593p4675597.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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