Sei sulla pagina 1di 2

Nasir Ahmed Khan Lab 05 2010-EE-043

Fourier Transform
Object:
To Calculate the DFT, IDFT and their magnitude and phase on matlab.

Task 01:






Task 02:
clc
syms n x y
n=0:3;
x=[1 0 0 1];
y=fft(x)

Output
y =
Columns 1 through 3
2.0000 1.0000 + 1.0000i 0
Column 4
1.0000 - 1.0000i

Task 03:
clc
syms n x y m p
n=0:3;
x=[1 0 0 1];
y=fft(x);
m=abs(y);
p=phase(y);
subplot(211)
stem(n,m)
subplot(212)
stem(n,p)
Nasir Ahmed Khan Lab 05 2010-EE-043

Task 04:
clc
syms n x y m p
n=0:35;
a=0.8;
x=a.^n;
y=fft(x);
m=abs(y);
p=phase(y);
subplot(211)
stem(n,m)
subplot(212)
stem(n,p)

Task 05:

clc
syms n x y z
n=0:3;
x=[1 0 0 1];
y=fft(x)
z=ifft(y)

subplot(221)
stem(n,x)
title('Signal')

subplot(222)
stem(n,y)
title('FFT')

subplot(223)
stem(n,z)
title('IFFT')


Conclusion:
In this lab we have learned,
DFT command
IDFT command
Angle command
Abs command

Potrebbero piacerti anche