Answer:
Explanation:
first convert difference equation to transfer function form,
apply laplase transform to difference equation
s2Y(s) + 6 * s * y(s) + 2 * y(s) = s * X(s) + 4 * X(s)
(s2 + 6s+2) * y(s) = (s+4)*X(s)Y s)
Lets write below code in matlab command prompt
lets use lodspace to create values from 10^-1 to 10^5 and use freqs to plot frequency response of above system with frequency w
>> n=[1 4];
>> d=[1 6 2];
>> w = logspace(-1,5);
>> freqs(n,d,w)
Attached is the written solution and the MATLAB diagram