Applies a Savitzky-Golay FIR smoothing filter.
y = filter_sg(x, p, f)
y = filter_sg(x, p, f, w)
y = filter_sg (x, p, f, w, d)Legacy name: sgolayfilt
Input signal to filter. x is a real array. If x is a matrix, the filter operates on each column of x.
Order of the polynomial. p is a positive integer.
Number of points to use in fitting. f is a positive odd integer.
Weighting vector. w can be an empty vector or a real vector with length f.
x = -1:0.01:1; y = x.^2+0.1.*rand(1, length(x)); z = filter_sg(y, 2, 15); plot(x, y, 'r', x, z, 'b')
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices