help-octave
[Top][All Lists]
Advanced

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

Re: detrend() in Matlab and Octave


From: Søren Hauberg
Subject: Re: detrend() in Matlab and Octave
Date: Thu, 23 Dec 2010 16:04:54 +0100

ons, 22 12 2010 kl. 20:28 -0500, skrev Ben Abbott:
> > The existing Octave 'detrend' should then remain with a different name -
> > because it has features the Matlab one doesn't have.
> > 
> > Regards,
> >  Sergei.
> 
> No need. There isn't an inherent incompatibility for the differing features.

I've just pushed a changeset that also allows you to set the polynomial
order as a string. That means you can do

  detrend (x, "constant")
  detrend (x, "linear")
  detrend (x, p)

where 'p' is any positive integer. The latter is the API used by Octave
so far, while the two first allow for compatibility. So Octave 3.4
should be compatible with Matlab while still supporting the "old" Octave
interface.

Søren

P.S. Matlab also allows you to remove piecewise linear trends. I have
not implemented this; it is left as an exercise to the reader ;-)



reply via email to

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