Engee documentation

Detrend

Removing a linear trend from a vector.

detrend

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.

Ports

Input

Input - input signal
vector

Input signal.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64.

Output

Output - output signal
`vector-column

The block returns the remaining data after removing the straight line that best fits the data in the least squares sense.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64.