FUNCTION REFERENCE

sgolay

Construct Savitzky-Golay polynomial smoothing and coefficient matrices.

Construct Savitzky-Golay polynomial smoothing and coefficient matrices.

Syntax

[b,g] = sgolay(order,framelen)

Fit powers of the centered sample offset by least squares (Savitzky and Golay, 1964). Use a scaled Vandermonde matrix and SVD. b is the framelen-by-framelen projection onto fitted polynomials. Column k+1 of g estimates the coefficient of offset^k; multiply by k! for a kth derivative per sample. Smoothing weights are the center row of b, or the first column of g.

Example

[b,g] = sgolay(3,7);

Differences from MATLAB: unweighted real double design only. framelen must be positive, odd and at most 255; 0<=order<framelen and order<=20. Very high orders may lose accuracy due to conditioning.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.