# fir_sgsmooth

Version:

Computes the coefficients of a Savitzky-Golay FIR smoothing filter.

## Syntax

b = fir_sgsmooth(p, f, w)
b = fir_sgsmooth(p, f)
[b, d] = fir_sgsmooth(p, f, w)
[b, d] = fir_sgsmooth(p, f)
Legacy name: sgolay

## p

Order of the polynomial. p must be a positive integer.

## f

Number of points to use in fitting. f must be a positive odd integer.

## w

Weighting vector. w can be an empty vector or an real vector with length f.

## b

Coefficients of the filter.

## d

Differentiation filters. The i-th column of d is a differentiation filter for derivatives of order i-1.

p = 2;
f = 15;
b = fir_sgsmooth(p, f)

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices