You are on page 1of 1

%Convolution of 2 signals

clc;
close all;
clear all;
t=-10:0.001:10;
x1=sin(t);
subplot(3,1,1);
plot(t,x1);
grid;
xlabel('time');
ylabel('amplitude');
title('input signal');
x2=cos(t);
subplot(3,1,2);
plot(t,x2);
grid;
xlabel('time');
ylabel('amplitude');
title('impulse signal ');
y=conv2(x1,x2);
subplot(3,1,3);
plot(y);
grid;
xlabel('time');
ylabel('amplitude');
title('convolution of signal');

You might also like