Lattice and lattice-ladder filter implementation
[f,g] = latcfilt(k,x)
[f,g] = latcfilt(k,v,x)
[f,g] = latcfilt(k,1,x)
[f,g,zf] = latcfilt(...,'ic',zi)
[f,g,zf] = latcfilt(...,dim)
All-pole IIR filters
Allpass IIR filters
General IIR filters
[f,g] = latcfilt(k,x) filters
the FIR lattice coefficients in the vector
The forward lattice filter result is
the backward filter result. If ,
to the minimum-phase output, and
to the maximum-phase output.
x are vectors,
the result is a (signal) vector. Matrix arguments are permitted under
the following rules:
x is a matrix and
a vector, each column of
x is processed through
the lattice filter specified by
x is a vector and
a matrix, each column of
k is used to filter
and a signal matrix is returned.
both matrices with the same number of columns, then the ith
k is used to filter the ith
x. A signal matrix is returned.
[f,g] = latcfilt(k,v,x) filters
the IIR lattice coefficients
k and ladder coefficients
v must be vectors,
x can be a signal matrix.
[f,g] = latcfilt(k,1,x) filters
the IIR lattice specified by
be vectors or matrices.
f is the all-pole lattice
filter result and
g is the allpass filter result.
[f,g,zf] = latcfilt(...,'ic',zi) accepts
the initial condition of the lattice states. Output
k vector specifying the final condition
of the lattice states.
[f,g,zf] = latcfilt(...,dim) filters
dim. To specify a
the FIR lattice coefficients
k must be a vector
and you must specify all previous input parameters in order. Use the
empty vector [ ] for any parameters you do not want to specify.
the final conditions in columns, regardless of the shape of
Generate a signal with 512 samples of white Gaussian noise.
x = randn(512,1);
Filter the data with an FIR lattice filter. Specify the reflection coefficients so that the lattice filter is equivalent to a 3rd-order moving average filter.
[f,g] = latcfilt([1/2 1],x);
Plot the maximum- and minimum-phase outputs of the lattice filter in separate plots
subplot(2,1,1) plot(f) title('Maximum-Phase Output') subplot(2,1,2) plot(g) title('Minimum-Phase Output')