Given the following LTID system yn 2 2n 1 2yn 0 where y1

Given the following LTID system: y[n + 2] - 2[n +1] + 2y[n] = 0 where y[-1] = 1 and y [-2] = 0. Write a MATLAB program to solve and plot the response y[n] for n = 0 to n = 20.

Solution

clc
clear
y(1)=0;
y(2)=1;
for n=3:23
y(n)=2*(y(n-1)-y(n-2));
k=n-2;
x(k)=y(n);
end
plot(x,k,\'*\')
x

output:


x =

Columns 1 through 13

2 2 0 -4 -8 -8 0 16 32 32 0 -64 -128

Columns 14 through 21

-128 0 256 512 512 0 -1024 -2048

 Given the following LTID system: y[n + 2] - 2[n +1] + 2y[n] = 0 where y[-1] = 1 and y [-2] = 0. Write a MATLAB program to solve and plot the response y[n] for

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site