Detrend
Removing a linear trend from a vector.
Description
The Detrend block removes a linear trend from an input vector of length M, , by subtracting the straight line that best fits the data in the least squares sense.
The least squares line, , is the line with parameters and , which minimise the number of
for M uniformly distributed values of , where is the -th element in the input vector. The output data, is always an M by 1 column vector.