<< nan_cumsum Descriptive Statistics nan_ecdf >>

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_detrend

nan_detrend

removes the trend from data, NaN's are considered as missing values

Calling Sequence

[...]=nan_detrend([t,] X [,p])
removes trend for unequandy spaced data
t represents the time points
X(i) is the value at time t(i)
p must be a scalar

[...]=nan_detrend(X,0)
[...]=nan_detrend(X,'constant')
removes the mean

[...]=nan_detrend(X,p)
removes polynomial of order p (default p=1)

[...]=nan_detrend(X,1) - default
[...]=nan_detrend(X,'linear')
removes linear trend

[X,T]=nan_detrend(...)

Parameters

X :

detrended data

T :

removed trend

Description

DETREND is fully compatible to previous Matlab and Octave DETREND with the following features added: - handles NaN's by assuming that these are missing values - handles unequandy spaced data - second output parameter gives the trend of the data - compatible to Matlab and Octave

See also

Authors


Report an issue
<< nan_cumsum Descriptive Statistics nan_ecdf >>