<< pds_calc (X->X) Other pretaitments simufilters >>

fact >> (X->X) Other pretaitments > savgol

savgol

smoothing, first or second derivate of spectra according to Savitzsky-Golay

Calling sequence

[result,SG_filter] = savgol(x,window,deriv(degree))

Arguments

x:

a Div structure or a matrix of dimensions (n x q)

window:

the window for the calculation; an odd integer >=3

deriv:

the derivative: 0 (smoothing), 1 (first derivative) or 2 (second derivative)

(degree):

the degree of the polynom; an integer between 2 and 5 ;by default degree=2

result:

the spectra obtained after the 0, 1 or 2nd derivative, into a Div structure

result.d is a matrix of dimensions (n x q)

SG_filter:

a matrix such that: result = x * SG_filter

SG_filter.d is a matrix of dimensions (q x q)

Note: the calculation (x*SG_filter) is less precise than the first output (result) at less than window/2 from the edges of the spectra

Examples

[result,f_sg]=savgol(x,15,1)

Bibliography

Authors


Report an issue
<< pds_calc (X->X) Other pretaitments simufilters >>