Answer to Question #160481 in MatLAB for Neha

Question #160481

1. A digital filter is described by

y(n) − 2.56y(n − 1) + 2.22y(n − 2) − 0.65y(n − 3) = x(n) + x(n − 3)

where x(n) is the input and y(n) is the output. Assume all zero initial conditions

(a) Generate the input signal x(n), which is a sinusoid of frequency 500 Hz sampled at 6 kHz.

(b) Compute the first four cycles of the output by directly implementing the above difference equation.

Plot the input and output on the same graph.

(c) Implement the above filter by using MATLAB “filter” function. Compare your results with part(b).

Comment on your result.

(d) Plot the impulse response of the filter by using MATLAB “impz” function. Comment on the results.


1
Expert's answer
2021-02-02T10:34:31-0500
>> x=[1 -2 1];
>> y=filter([0.5 -0.5],[1 -0.25],x)
y =

   0.50000  -1.37500(y(1))   1.15625







Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS