Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

detrend (timeseries) - Subtract mean or best-fit line and all NaNs from time series

Syntax

ts = detrend(ts1,method)
ts = detrend(ts1,Method,Index)

Description

ts = detrend(ts1,method) subtracts either a mean or a best-fit line from time-series data, usually for FFT processing. Method is a string that specifies the detrend method and has two possible values:

ts = detrend(ts1,Method,Index) uses the optional Index integer array to specify the columns or rows to detrend. When ts.IsTimeFirst is true, Index specifies one or more data columns. When ts.IsTimeFirst is false, Index specifies one or more data rows.

Remarks

You cannot apply detrend to time-series data with more than two dimensions.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS