Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Savitzky-Golay filtering

`y = sgolayfilt(x,order,framelen)`

`y = sgolayfilt(x,order,framelen,weights)`

`y = sgolayfilt(x,order,framelen,weights,dim)`

Savitzky-Golay smoothing filters are typically used to "smooth out" a noisy signal whose frequency span (without noise) is large. They are also called digital smoothing polynomial filters or least-squares smoothing filters. Savitzky-Golay filters perform better in some applications than standard averaging FIR filters, which tend to filter high-frequency content along with the noise. Savitzky-Golay filters are more effective at preserving high frequency signal components but less successful at rejecting noise.

Savitzky-Golay filters are optimal in the sense that they minimize the least-squares error in fitting a polynomial to frames of noisy data.

[1] Orfanidis, Sophocles J. *Introduction to Signal
Processing*. Englewood Cliffs, NJ: Prentice-Hall, 1996.