You are on page 1of 3

EXPERIMENT NO - 4

CONVOLUTION & DECONVOLUTION OF CTS


1. Convolution
a.

t=0:0.01:3;
f=1;
y1=cos(2*pi*f*t);
subplot(1,3,1); plot(t,y1)
f=1;
y2= 1 + square(2*pi*f*t);
subplot(1,3,2); plot(t,y2)
y3=conv(y1,y2);
x3=length(y3);
t1=0:1:(x3-1);
dt=0.01;
tt=t1*dt;
subplot(1,3,3); plot(tt,y3)

b)

t=0:0.01:3;
f=1;
y1=5*cos(2*pi*f*t);
figure
subplot(1,3,1); plot(t,y1)
f=1;
y2= sawtooth(2*pi*f*t,0.5);
subplot(1,3,2); plot(t,y2)

1
y3=conv(y1,y2);
x3=length(y3);
t1=0:1:(x3-1);
dt=0.01;
tt=t1*dt;
subplot(1,3,3); plot(tt,y3)

2)

a.

t=0:0.01:2;
y1=exp(-0.7*t);
figure
subplot(2,3,1); plot(t,y1)
y2=ones(size(t));
subplot(2,3,2); plot(t,y2)
y3=conv(y1,y2);
x3=length(y3);
t1=0:1:(x3-1);
dt=0.01;
tt=t1*dt;
subplot(2,3,3); plot(tt,y3)
y4 = deconv(y3,y2);
subplot(2,3,4); plot(t,y4)
y5 = deconv(y3,y1);
subplot(2,3,5); plot(t,y5)
axis([0,2,0,2])

2
3

You might also like