Table Of Contents

detrend

Version:
    Last Modified: March 15, 2017

    Removes a trend from input data.

    Syntax

    y = detrend(x)
    y = detrend(x, option)
    y = detrend(x, option, break)

    Inputs

    x

    Data from which you want to remove a trend. x is a vector or matrix. If x is a matrix, MathScript performs column-wise detrending.

    option

    Trend to remove from x. option is a string that accepts the following values:

    Name Description
    'constant'

    Removes mean values.

    'linear'

    Removes linear effects where the breakpoints are defined by break.

    Default: 'linear'

    break

    Specifies the breakpoints. break is a vector of indexes of x. If you specify the 'constant' trend, you cannot specify break.

    Outputs

    y

    x with the trend removed.

    X = [3, 2, -1; 1, 6, 3; 2, -4, 0];
    Y = detrend(X)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics