You are on page 1of 4

EXPERIMENT NO: 7

AIM:- Write a Matlab program to find N-point DFT using a Fast Fourier transform
(FFT) algorithm.

THEORY:-Discrete Fourier transform is a finite duration discrete frequency


sequence i.e. obtained by sampling one period of FT.
It is given by a formula,
X(k)=∑x(n)e-j2πkn/N for k=0,1,2,….,N-1
It can be also written as,
X(k)=∑x(n) WNKn
Where, WNKn = e-j2πkn/N
Lets define W, which constitutes complex basic function, is equal to e-j2π . W is
also referred as twiddle factor. This factor focuses on very important properties of
DFT & makes the computation of DFT bit easier and fast. Time reversal of a
sequence -->
Time reversal property states that if x(n) <―>X(k)
Then x((-n))N= x(N-n) <―> X((-k))N =X(N-k)
Proof:-

By definition of DFT

DFT{x(N-n)} = ∑x(m) = e-j2k(N-M)/N

=∑ x(m) e-j2kM/N

=∑ x(m) e-j2m(N-k)/N

=X(N-K)

Circular time shift of a sequence:

Circular time shift of a sequence states that if x(n)<―>X(k)

Then x((n-l))N <―> X(k) e-j2πkl/N

proof: By definition of DFT we have,


DFT {x((n-l))N}=∑ x((n-l))N e-j2πkn/N

But x((n-l))N =x((n-l+N))

So ∑ x((n-l))N e-j2πkn/N =∑ x(N-l+n) e-j2πkn/N

=∑ x(m) e-j2πk(m+l)/N

=X(k) e-j2πkl/N

PROGRAM:-

%Computes the Discrete Fourier Transform (DFT) of X using a Fast Fourier


transform (FFT) algorithm
clc;
clear all;
close all;
x=input('Enter the sequence of x[n]:-');
x1=fft(x);
subplot(2,2,1);
stem(imag(x1));
title('imaginary DFT');
disp('DFT');
disp(x1);
subplot(2,2,2);
stem(real(x1));
title('real DFT');
y=ifft(x1);
subplot(2,2,3);
stem(imag(y));
title('imaginary IDFT');
disp('IDFT');
disp(y);
subplot(2,2,4);
stem(real(y));
title('real IDFT');.

OUTPUT:
RESULT:-

Thus,program to find N-point DFT using a Fast Fourier transform (FFT)


algorithm execute successfully

You might also like