You are on page 1of 3

DSP-LAB-3-Task

SUBMITTED BY: SHAZIR ALI KHAN


REG NO # SP18-BTN-004
SUBMITTED TO: Maam Zenab Fazal
DATE: 27 August, 2020
LAB TASK:
fs=50; % sampling freq
T=1/fs;
t=0:1/fs:4;
x=sin(2*pi*1*t)+sin(2*pi*2*t); % CT signal
subplot(221)
plot(t,x);
xlabel('time');
ylabel('x(t)');
title('continous signal')
subplot(222)
stem(1:length(t),x) %sampled signal
sum=0;
subplot(223)
for i=1:length(x)
sum=sum+x(i).*sinc(pi*(t-i.*T)/T); %
convolution with sinc
hold on
plot(sum)
% pause(0.1)
end
subplot(224)
plot(t,sum) %reconstructed signal plotting

FIGURE:

You might also like