Filter data with recursive (IIR) or nonrecursive (FIR) filter
filter is a MATLAB® function.
Filter is also an overloaded method of the discrete-time filter object (dfilt). You can pass an object handle, data, and optionally, the dimension into the filter method.
The MATLAB filter function describes a zi input for initial conditions. Note that the recommended way of passing initial conditions into a dfilt is by using the states property. For more information, see the dfilt reference page.
Using the filter function on b and a coefficients normalizes the filter by forcing the a0 coefficient to be equal to 1.
Using the filter method on a dfilt object does not normalize the a0 coefficient.
The denominator of FIR filters is, by definition, equal to 1. To use the filter function with the b coefficients from an FIR function, use y = filter(b,1,x) .