Answer to Question #291319 in MatLAB for Madhu

Question #291319

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

1
Expert's answer
2022-01-28T12:59:02-0500
close all,
clear all,
clc,


% y(n) −2.56y(n −1)+2.22y(n−2)−0.65y(n−3) = x(n)+x(n−3)
% y(n) = 2.56y(n −1)-2.22y(n−2)+0.65y(n−3) + x(n)+x(n−3)
y=[];
x=0:1:10;
for n=1:1:length(x)
    if(n<6),
        y(n)=0; 
    else
        y(n) =  x(n) + (1/2)*x(n-1) + 2*x(n-2) + 4*x(n-3) - x(n-5);
        y(n) = 2.56*y(n -1) - 2.22*y(n-2)+0.65*y(n-3) + x(n)+x(n-3);
    end
end
scrsz = get(0,'ScreenSize');
Dim=0;
figure('Position',[scrsz(1)+Dim, scrsz(2)+Dim,scrsz(3)-20,scrsz(4)-100]);
plot(x,y);
grid on,
xlabel('--- x --->');
ylabel('y(n) = 2.56*y(n -1) - 2.22*y(n-2)+0.65*y(n-3) + x(n)+x(n-3');
title('Plot: y(n) = 2.56*y(n -1) - 2.22*y(n-2)+0.65*y(n-3) + x(n)+x(n-3','FontSize',20);

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