[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: detrend
From: |
Tristan Quaife |
Subject: |
Re: detrend |
Date: |
Wed, 18 Oct 2000 14:29:44 +0100 |
flatmax wrote:
>
> Hi there,
> Can any one technically define what is happening in the 'detrend'
> algorithm ?
>
> function y = detrend (x, p)
> r = rows (x);
> b = ((1 : r)' * ones (1, p + 1)) .^ (ones (r, 1) * (0 : p));
> y = x - b * (b Ü x);
>
If I remember correctly, the detrend function
fits a polynomial of order p to the vector x
and then returns the vector x with the polynomial
subtracted from it.
Tristan.
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- detrend, flatmax, 2000/10/18
- Re: detrend,
Tristan Quaife <=
- Re: detrend, Teemu Ikonen, 2000/10/18