%Input Signal
nx=[-1 0 1 2];
x=[1 0 3 -3];
subplot(3,2,1);
stem(nx,x,'filled');
title('x[n]');
axis ([-5 5 -4 4]);
%Impulse Response h[1-k]
nh=[-1 0 1];
h=[1 4 -2];
subplot(3,2,3);
stem(nh,h,'filled');
title('h[1-k]');
axis ([-5 5 -3 5]);
%displacement i =1
%Intermediate output y[1]
ny=[-1 0 1 2];
y=[0 0 -5 0];
subplot(3,2,5);
stem(ny,y,'filled');
title('y[1]');
axis ([-5 5 -6 1]);
%Input Signal
nx=[-1 0 1 2];
x=[1 0 3 -3];
subplot(3,2,2);
stem(nx,x,'filled');
title('x[n]');
axis ([-5 5 -4 4]);
%Impulse Response h[2-k]
nh=[0 1 2];
h=[1 4 -2];
subplot(3,2,4);
stem(nh,h,'filled');
title('h[2-k]');
axis ([-5 5 -3 5]);
%displacement i=2
%Intermediate output y[2]
ny=[0 1 2 3];
y=[0 0 18 0];
subplot(3,2,6);
stem(ny,y,'filled');
title('y[2]');
axis ([-5 5 0 20]);
