EEL 3135: Signals and Systems
Dr. Fred J. Taylor, Professor
Syntax
y = filter(b,a,X)
[y,zf] = filter(b,a,X)
[y,zf] = filter(b,a,X,zi)
y = filter(b,a,X,zi,dim)
[...] = filter(b,a,X,[],dim)
Description
y = filter(b,a,X)
filters the data in vector
X
with the filter described by numerator coefficient
vector
b
and denominator coefficient vector
a
. If
a(1)
is not equal to
1
,
filter
normalizes the filter
coefficients by
a(1)
. If
a(1)
equals
0
,
filter
returns an error.
If
X
is a matrix,
filter
operates on the columns of
X
. If
X
is a multidimensional array,
filter
operates on the first nonsingleton dimension.
[y,zf] = filter(b,a,X)
returns the final conditions,
zf
, of the filter delays. If
X
is a row or
column vector, output
zf
is a column vector of
max(length(a),length(b))-1
. If
X
is a matrix,
zf
is an array of such vectors, one for each column of
X
, and similarly for multidimensional arrays.
[y,zf] = filter(b,a,X,zi)
accepts initial conditions,
zi
, and returns the final conditions,
zf
,
of the filter delays. Input
zi
is a vector of length
max(length(a),length(b))-1
, or an array with
the leading dimension of size
max(length(a),length(b))-1
and with remaining dimensions
matching those of
X
.
y = filter(b,a,X,zi,dim)