filter
1-D digital filter
Description
filters
the input data y
= filter(b
,a
,x
)x
using a rational transfer function defined
by the numerator and denominator coefficients b
and a
.
If a(1)
is not equal to 1
,
then filter
normalizes the filter coefficients
by a(1)
. Therefore, a(1)
must
be nonzero.
If
x
is a vector, thenfilter
returns the filtered data as a vector of the same size asx
.If
x
is a matrix, thenfilter
acts along the first dimension and returns the filtered data for each column.If
x
is a multidimensional array, thenfilter
acts along the first array dimension whose size does not equal 1.
Examples
Input Arguments
Output Arguments
More About
Tips
To use the
filter
function with theb
coefficients from an FIR filter, usey = filter(b,1,x)
.If you have Signal Processing Toolbox™, use
y = filter(d,x)
to filter an input signalx
with adigitalFilter
(Signal Processing Toolbox) objectd
. To generated
based on frequency-response specifications, usedesignfilt
(Signal Processing Toolbox).See Digital Filtering (Signal Processing Toolbox) for more on filtering functions.
References
[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice-Hall, 1999.
Extended Capabilities
Version History
Introduced before R2006a