06 December 2007

N-Point DFT and IDFT

N-Point DFT of a Function and its IDFT

  • Discrete Fourier Transform
  • Inverse Discrete Fourier Transform

DFT is defined as X(k)= summation from n=0 to N-1 of E-j*2*pi*k*(n/N)

% program to find N-point DFT of a given function x(n) and also its IDFT

clear all ; % close all

x=input('enter the sequence ');

N=input('Enter the length of the DFT');

xk=fft(x, N); %find DFT

magnitude=abs(xk); %find magnitude



stem(n,magnitude); % plot magnitude response.

phaseplot=angle(xk); %find phase angle


stem(n,phaseplot); %plot phaseplot

%To find IDFT

xn=ifft(xk); %find IDFT


stem(xn); %plot IDFT sequence

No comments:

Post a Comment

Your Comments... (comments are moderated)