Derivativecolumns
Jump to navigation
Jump to search
Purpose
The "Derivative Columns (SavGol)" preprocessing method performs Savitzky-Golay smoothing and differentiation on columns.
Synopsis
- [y_hat,cm] = savgol(y,width,order,deriv,options)
Description
DerivativeColumns performs Savitzky-Golay smoothing and differentation to the columns of an input matrix by transposing the input matrix before applying SAVGOL. See savgol for details of SAVGOL.
Options
options = a structure array with the following fields:
- useexcluded: [ {'true'} | 'false' ], governs how excluded data is handled by the algorithm.
- If 'true', excluded data is used when handling data on the edges of the excluded region (unusual excluded data may influence nearby non-excluded points).
- When 'false', excluded data is never used and edges of excluded regions are handled like edges of the spectrum (may introduce edge artifacts for some derivatives).
- tails: ['traditional' | {'polyinterp'} | 'weighted'], governs how edges of data and excluded regions are handled.
- 'traditional' is an older approach and isn't recommended.
- 'polyinterp' and 'weighted' provide smoother edge transitions.
- 'weighted' uses '1/d' window weighting. It is less affected by end-effects than 'traditional' and 'polyinterp'.
- wt: [ {' '} | '1/d' | [1xwidth] ] allows for weighted least-squares when fitting the polynomials.
- ' ' (empty) provides usual (unweighted) least-squares.
- '1/d' weights by the inverse distance from the window center, or
- a 1 by width vector with values 0<wt<=1 allows for custom weighting.