clc;
clear all;
close all;
x=[1,2,3,4,5];
subplot(3,2,1);
stem(x);
xlabel('n');
title('First Signal');
ylabel('Amplitude');
y=[5,4,3,2,1];
subplot(3,2,2);
stem(y);
xlabel('n');
title('Second Signal');
ylabel('Amplitude');
z=conv(x,y);
subplot(3,2,3);
stem(z);
xlabel('n');
title('Convolution of Signal');
ylabel('Amplitude');
c=deconv(z,y);
subplot(3,2,4);
stem(c);
xlabel('n');
title('Deconvolution of First Signal');
ylabel('Amplitude');
b=deconv(z,x);
subplot(3,2,5);
stem(b);
xlabel('n');
title('Deconvolution of Second Signal');
ylabel('Amplitude');