AIM:
To find DFT and IDFT of a sequence.
APPARATUS REQUIRED:
Hard ware: IBM PC or compatible
Soft ware : Matlab 6.5 or higher
THEORY:
In mathematics, the discrete Fourier
transform (DFT) is a specific kind of discrete transform, used in Fourier
analysis. It transforms one function into another, which is called the
frequency domain representation, or simply the DFT, of the original function
(which is often a function in the time domain). The DFT requires an input
function that is discrete. Such inputs are often created by sampling a
continuous function, such as a person's voice. The discrete input function must
also have a limited (finite) duration, such as one period of a periodic
sequence or a windowed segment of a longer sequence. Unlike the discrete-time
Fourier transform (DTFT), the DFT only evaluates enough frequency components to
reconstruct the finite segment that was analyzed. The inverse DFT cannot
reproduce the entire time domain, unless the input happens to be periodic.
Therefore it is often said that the DFT is a transform for Fourier analysis of
finite-domain discrete-time functions.
FFT algorithms are so commonly
employed to compute DFTs that the term "FFT" is often used to mean
"DFT" in colloquial settings. Formally, there is a clear distinction:
"DFT" refers to a mathematical transformation or function, regardless
of how it is computed, whereas "FFT" refers to a specific family of
algorithms for computing DFTs. The terminology is further blurred by the (now
rare) synonym finite Fourier transform for the DFT, which apparently predates
the term "fast Fourier transform"
The discrete Fourier transform (DFT) is given by:
The inverse discrete Fourier transform (IDFT) is
given by:
PROGRAM:
clc;
clear
all;
close
all;
x=input('enter the sequence');
x1=fft(x);
subplot(2,2,1);
stem(imag(x1));
title('imaginary fft');
disp('fft');
disp(x1);
subplot(2,2,2);
stem(real(x1));
title('real fft');
y=ifft(x1);
subplot(2,2,3);
stem(imag(y));
title('imaginary ifft');
disp('ifft');
disp(y);
subplot(2,2,4);
stem(real(y));
title('real ifft');
Enter the sequence [1
2 3 4]
Tags: MATLAB basics, MATLAB programs, MATLAB signal generation, Learn MATLAB, IDFT, DFT, IDFT using MATLAB, DFT using MATLAB, IDFT programs, DFT programs, IDFT and DFT programs