In lab6 you found convolution htxt using three methods analy
Solution
%linear convolution.
% to write a program to do linear convolution for continus and discrete
% time signals and plot the graphs.
%linear convolution for continuous LTI system.
close all;
clear all;
clc;
t=0:0.01:5;
x=exp(t);
y=exp(t.^2);
z=conv(x,y);
subplot(3,1,1);
plot(t,x);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'time signal-1\');
subplot(3,1,2);
plot(t,y);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'time signal-2\');
subplot(\'3,1,3\');
plot(z);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'convoluted signal\');
example-2:
close all;
clear all;
clc;
x=[1 2 3];
y=[6 7 8];
z=conv(x,y);
subplot(3,1,1);
stem(x);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'time signal-1\');
subplot(3,1,2);
stem(y);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'time signal-2\');
subplot(3,1,3);
stem(z);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'convoluted signal\')

