Documentation of dtrend


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

zd=dtrend(z,o,brp)

Help text

DTREND Removes trends from data sets.
   ZD = DTREND(Z)    or   ZD = DTREND(Z,O,BREAKPOINTS)

   Z is the data set to be detrended, organized with the data records as
   column vectors. ZD is returned as the detrended data.

   If O = 0 (the default case) the sample means are removed from each of
   the columns.

   If O = 1, linear trends are removed. A continuous, piecewise linear
   trend is adjusted to each of the data records, and then removed. The
   interior breakpoints for the linear trend segments are contained in
   the row vector BREAKPOINTS. The default value is that there are no
   interior breakpoints, so that one single straight line is removed from
   each of the data records.

   This function is obsolete.  Please use DETREND instead.

   See also DETREND, IDFILT.

Cross-Reference Information

This function calls This function is called by

Listing of function dtrend

function zd=dtrend(z,o,brp)

%   L. Ljung 7-8-87
%   Copyright (c) 1986-98 by The MathWorks, Inc.
%   $Revision: 2.4 $  $Date: 1998/03/25 22:50:12 $

if nargin < 2, o = 0; end	% Default is mean removal, unlike DETREND

if nargin < 3
  zd = detrend(z,o);
else
  zd = detrend(z,o,brp);
end