You are on page 1of 2

EXPERIMENT NO :2

Object : To Evaluate 4 point DFT and


IDFT x(n)=1,0<=n<=3;0 else where

Software Used : Matlab 7.5 R2007b

Theory : 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). But the DFT requires an input function that is discrete and whose
non-zero values have a limited (finite) duration. Such inputs are often
created by sampling a continuous function.

IDFT :It is the inverse of the discrete Fourier transform.It is used to


recover the sequence from the frequency samples.

Program:

n=0:10;
for n=0:10
if(0<=n)&&(n<=3)
x(n+1)=1;
else
x(n+1)=0;
end
end
y=fft(x,4)

Output:

y=

4 0 0 0
IDFT

Program:

n=0:10;
for n=0:10
if(0<=n)&&(n<=3)
x(n+1)=1;
else
x(n+1)=0;
end
end
y=ifft(x,4)

Output:

y=

1 0 0 0

You might also like