From 9:00 AM - 12:00 PM CDT on Saturday, June 6th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

detrend (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: statistics

Requires: MathScript RT Module

Syntax

y = detrend(x)

y = detrend(x, option)

y = detrend(x, 'linear', break)

Description

Removes a trend from input data.

Examples

Inputs

Name Description
x Specifies the data from which you want to remove a trend. x is a vector or matrix. If x is a matrix, LabVIEW performs column-wise detrending.
option Specifies the trend to remove from x. option is a string that accepts the following values.

'constant' Removes mean values.
'linear' (default) Removes linear effects where the breakpoints are defined by break.
break Specifies the breakpoints. break is a vector of indexes of x. If you specify the 'constant' trend, you cannot specify break.

Outputs

Name Description
y Returns x with the trend removed.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

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

Related Topics

mean

WAS THIS ARTICLE HELPFUL?

Not Helpful