Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

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


y = detrend(x)

y = detrend(x, option)

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


Removes a trend from input data.



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.


Name Description
y Returns x with the trend removed.


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


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

Related Topics



 Was this document helpful?  submit
  Helpful Not Helpful