0% found this document useful (0 votes)
43 views4 pages

DFT of The Signal

1) The document discusses the discrete Fourier transform (DFT) and inverse discrete Fourier transform (IDFT) of signals. It provides definitions and examples of using FFT and IFFT functions in code to compute the DFT and IDFT. 2) Three questions are answered by providing code that calculates the DFT and IDFT of given signals. This includes finding the DFT and IDFT of signals {0 1 2 3}, {2, 1-j, 0, 1+j}, and a signal equal to 1 for n>=3. 3) The conclusion restates that the DFT and IDFT of signals were observed and plotted using the FFT and IFFT functions.

Uploaded by

pkrsuresh2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views4 pages

DFT of The Signal

1) The document discusses the discrete Fourier transform (DFT) and inverse discrete Fourier transform (IDFT) of signals. It provides definitions and examples of using FFT and IFFT functions in code to compute the DFT and IDFT. 2) Three questions are answered by providing code that calculates the DFT and IDFT of given signals. This includes finding the DFT and IDFT of signals {0 1 2 3}, {2, 1-j, 0, 1+j}, and a signal equal to 1 for n>=3. 3) The conclusion restates that the DFT and IDFT of signals were observed and plotted using the FFT and IFFT functions.

Uploaded by

pkrsuresh2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

LAB -4

TITLE- DFT AND IDFT OF THE SIGNAL.

THEORY:

FFT Discrete Fourier transform.


FFT(X) is the discrete Fourier transform (DFT) of vector X. For
matrices, the FFT operation is applied to each column. For N-D
arrays, the FFT operation operates on the first non-singleton
dimension.

FFT(X,N) is the N-point FFT, padded with zeros if X has less


than N points and truncated if it has more.

FFT(X,[],DIM) or FFT(X,N,DIM) applies the FFT operation across the


dimension DIM.

IFFT Inverse discrete Fourier transform.


IFFT(X) is the inverse discrete Fourier transform of X.

IFFT(X,N) is the N-point inverse transform.

IFFT(X,[],DIM) or IFFT(X,N,DIM) is the inverse discrete Fourier


transform of X across the dimension DIM.

IFFT(..., 'symmetric') causes IFFT to treat X as conjugate symmetric


along the active dimension. This option is useful when X is not exactly
conjugate symmetric merely because of round-off error. See the
reference page for the specific mathematical definition of this
symmetry.

Q.1 Find DFT of the signal.


X[n]={0 1 2 3}

CODE:

x=[0 1 2 3]
m=4
u=fft(x,m)
k=0:1:3
subplot(2,1,1)
stem(k,abs(u))
subplot(2,1,2)
stem(k,angle(u))
title('DFT OF THE SIGNAL')

1
6

0
0 0.5 1 1.5 2 2.5 3

DFT OF THE SIGNAL


4

-2

-4
0 0.5 1 1.5 2 2.5 3

Q.2 Find IDFT of the signal.


X[k]={2, 1-j,0,1+j}

CODE:

b=complex(1,-1)
c=complex(1,1)
x=[2 b 0 c]
m=4
u=ifft(x,m)
k=0:1:3
subplot(2,1,1)
stem(k,abs(u))
subplot(2,1,2)
stem(k,angle(u))
title('IDFT OF THE SIGNAL')

2
1

0.5

0
0 0.5 1 1.5 2 2.5 3

IDFT OF THE SIGNAL


1

0.5

-0.5

-1
0 0.5 1 1.5 2 2.5 3

Q.3 Find DFT


U[n]=1 n>=3

CODE:

i=1
for n=0:1:3
if n>=0
x(i)>=1
end
i=i+1
end
m=4
u=fft(x,m)
k=0:1:3
subplot(2,1,1)
stem(k,abs(u))
subplot(2,1,2)
stem(k,angle(u))
title('DFT OF THE SIGNAL')

3
4

0
0 0.5 1 1.5 2 2.5 3

DFT OF THE SIGNAL


1

0.5

-0.5

-1
0 0.5 1 1.5 2 2.5 3

CONCLUSION-We observed and plot the DFT and IDFT of the signal.We know that
FFT(X,N) and IDFT(X,N) function.

You might also like