Name - Mhatre Shreyash Moreshwar Class - T.E. Div - B Batch - B1 Roll No - 21 Subject - Ost
Name - Mhatre Shreyash Moreshwar Class - T.E. Div - B Batch - B1 Roll No - 21 Subject - Ost
PRACTICAL NO - 3
Aim:
Theory:
The discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a
function into a same-length sequence of equally-spaced samples of the discrete-time Fourier
transform (DTFT), which is a complex-valued function of frequency. The interval at which the
DTFT is sampled is the reciprocal of the duration of the input sequence. An inverse DFT is a Fourier
series, using the DTFT samples as coefficients of complex sinusoids at the corresponding DTFT
frequencies. It has the same sample-values as the original input sequence. The DFT is therefore said
to be a frequency domain representation of the original input sequence. If the original sequence spans
all the non-zero values of a function, its DTFT is continuous (and periodic), and the DFT provides
discrete samples of one cycle. If the original sequence is one cycle of a periodic function, the DFT
provides all the non-zero values of one DTFT cycle. In digital signal processing, the function is any
quantity or signal that varies over time, such as the pressure of a sound wave, a radio signal
OUTPUT :
Procedure:
1. Open Scilab
Code :
clear all;
clc;
N=8;
j= sqrt(-1);
xn= [2,2,2,2,1,1,1,1];
xk=zeros (1,N);
for k= 0:1:N-1
for n= 0:1:N-1
xk(k+1)= xk(k+1) +xn(n+1) *exp(-j*2*%pi*k*n/N);
end
end
disp(xk,"DFT sequence is ")
Magxk= abs(xk)
disp(Magxk,"Magnitude Sequence is ");
Phaxk= atan(imag(xk),real(xk))
disp(Phaxk,"Phase Sequence is ");
wk= 0:1:N-1;
subplot (2,1,1)
plot2d3(wk,Magxk);
title('Magnitude Spectrum')
xlabel('k')
ylabel('Magxk')
subplot(2,1,2)
plot2d3(wk,Phaxk);
title('Phase Spectrum')
xlabel('k')
ylabel('Phaxk')
OUTPUT :
Conclusion: