Method ao/detrend


  DETREND detrends the input analysis object using a polynomial of degree N.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  DESCRIPTION: DETREND detrends the input analysis object using a
               polynomial of degree N.
 
  CALL:        b = detrend(a1,a2,a3,..., pl)
 
  INPUTS:      aN  - a list of analysis objects
               pl  - a parameter list
 
  OUTPUTS:     b - array of analysis objects
 
               If the last input argument is a parameter list (plist) it is used.
               The following parameters are recognised.
 
  NOTE: detrend uses two possible algorithms. By default, or if the order 
  is higher than 10, then a MATLAB code is used which is typically much
  slower, but giving coefficents that can be easily called within pest/eval.
  A fast C-code implementation is also available for orders less than 11. 
  You can force the use of the C code using a plist option. When interpreting the
  resulting coefficients, you must be clear which algorithm was used. For
  the C-code algorithm, the coefficients are scaled from the original by
  
      z = 2.*ii/(n-1)-1;
  
  such that the functional form (for a three-coefficient example) that is
  subtracted from the data can be recovered with:
  
  fitted_c = c.y(3).*z.^2 + c.y(2).*z + c.y(1); 
  
  
  The procinfo field of the output AOs is filled with the following key/value
  pairs:
 
     'COEFFS' - pest object with coefficients describing the subtracted trend function
                Note that they correspond to physical trend coefficents
                only if using the (default) option 'M-FILE ONLY'. In the
                case of using the (faster) C-code algorithm, see the note above.
 
  Parameters Description
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Method Details
Access public
Defining Class ao
Sealed 0
Static 0

Parameter Description

Default

no description
Key Default Value Options Description
detrend
ORDER, N 1
  • -1
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
The order of detrending:
  • -1 - no detrending
  • 0 - subtract mean
  • 1 - subtract linear fit
  • N - subtract fit of polynomial, order N
M-FILE ONLY 1
  • 1
  • 0
Using M-file call
TIMES [] none Evaluate the trend only on a limited data segment, and then detrend the whole data set.
An array of start/stop times to split by.
The times should be relativeto the object reference time (t0).

Example

plist('ORDER', [1], 'M-FILE ONLY', [true], 'TIMES', [[]])

back to top back to top

Some information of the method ao/detrend are listed below:
Class name ao
Method name detrend
Category Signal Processing
Package name ltpda
VCS Version 967b0eec0dece803a81af8ef54ad2f8c784b20b2
Min input args 1
Max input args -1
Min output args 1
Max output args -1
Can be used as modifier 1
Supported numeric types {'double'}




©LTP Team