help-octave
[Top][All Lists]
Advanced

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

Re: matlab code for filter


From: Søren Hauberg
Subject: Re: matlab code for filter
Date: Wed, 04 Feb 2009 13:16:00 +0100

ons, 04 02 2009 kl. 07:09 -0500, skrev Ben Abbott:
> The two lines below, will run fine in Octave.
> 
> > belowzero=pethsmooth<0;
> > pethsmooth(belowzero)=0;
> 
> It would be easier (and I think clearer) to write
> 
>       pethsmooth (pethsmooth<0) = 0;

Or

  pethsmooth = max (pethsmooth, 0);

Søren



reply via email to

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