Filter signal using Savitzky-Golay Filter.
xf = sgolayfilt(X, B) xf = sgolayfilt(X, k, nf) xf = sgolayfilt(X, k, nf, w)
a real array. If it is a vector it contains the signal to be filtered else each column of X is filtered.
a real n by n array: the set of filter coefficients produced by the sgolay function.
a positive scalar with integer value: the fitting polynomial degree.
a positive scalar with integer value: the filter length, must be odd and greater than k+1.
a real array: the filtered signal(s).
This function applies a sgolay filter which can be specified either by its set of filter coefficients as produced by sgolay either by the degree of the polynomial and the filter length.
According to the article the -3dB cutoff frequency can be approximated by (k+1)/(3.2*nf-4.6).
Signal size should be greater than the filter length
Abraham Savitzky et Marcel J. E. Golay, « Smoothing and Differentiation of Data by Simplified Least Squares Procedures », Analytical Chemistry, vol. 8, no 36, 1964, p. 1627–1639 (DOI 10.1021/ac60214a047)
On the Frequency-Domain Properties of Savitzky-Golay Filters.
|6.1.1||Function sgolayfilt added. Courtesy of Serge Steer, INRIA|
|Report an issue|
|<< sgolaydiff||Filtrage||srfaur >>|