tsOut = detrend(ts)
tsOut = detrend(ts, 'constant')
| Parameter | Description |
|---|---|
| ts | Input timeseries object. |
| option | Optional detrend mode. |
| Parameter | Description |
|---|---|
| tsOut | Detrended timeseries object. |
detrend Applies detrend to the numeric data and preserves the time axis and metadata.
ts = timeseries([1; 2; 3], [1; 2; 3]);
ts = detrend(ts, 'constant');
ts.Data
| Version | Description |
|---|---|
| 2.0.0 | initial version |