Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Dept.

of Electronics and Electrical


Communication Engineering Indian Institute of
Technology Kharagpur

DIGITAL SIGNAL PROCESSING-2

(EC31202)

Name : Akula Tejaswini


Roll No: 21EC30009
Matlab Code:
clc;
clear all;
for m=1:1:4
L=m*10;
N=128;
X=zeros(N);
for i=1:N
X(i)=i-64-1;
end
figure(m);
subplot(2,1,1);
stem(X);
title('Original signal X(n)')

f=(0:N-1)*(1/N);

y=fft(X);

for i=1:(L/2)
y((N/2)-i+1)=0;
y((N/2)+i+1)=0;
end
z=ifft(y);

subplot(2,1,2)
stem(z);
title(strcat('Dft reconstuction for L=',num2str(L)))

end
DISCUSSION:
1.Here we did a DFT of a given sequence and then we modified some
components in the frequency domain and took the IDFT.
2.After taking DFT we set some of the frequency components as zero
.After we take the IDFT of the modified frequency response we will get a
signal which does not resemble with the original signal .
3.Because when are changing the values in frequency domain we are
indirectly changing the values of the signal in the time domain .
4.The zeroing operation is basically used for filtering out the noise in the
given signal. The change in the signal will become significant as we
change more no of frequency components in the DFT .

You might also like