I have a filter response in the $z$-domain.
$$H_0(z) = 2 + 6z^{−1} + z^{−2} + 5z^{−3} + z^{−5}$$
How do I implement this filter on MATLAB?
I can do this if I have the coefficients but I do not know how to get them.
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityI have a filter response in the $z$-domain.
$$H_0(z) = 2 + 6z^{−1} + z^{−2} + 5z^{−3} + z^{−5}$$
How do I implement this filter on MATLAB?
I can do this if I have the coefficients but I do not know how to get them.
Your filter is a 5-tap delay line FIR filter. The FIR filter's coefficients are [2 6 1 5 1]
. If x
is your filter's input sequence and you execute the following MATLAB command:
h = [2 6 1 5 1];
you can then implement the filter (to produce a y
output sequence) using the following MATLAB command:
y = filter(h, 1, x);
You can see your filter's frequency magnitude and phase responses by executing the following MATLAB command:
freqz(h, 1, 256)