You are on page 1of 2

DEPARTMENT OF ELECTRONICS & COMM.

ENGG
Experiment No. 6
Aim : To find Fourier transform of square pulse plot its amplitude and Phase Spectrum..
Apparatus : PC with MATLAB software
Theory: The Fourier transform (FT) decomposes a function of time (a signal) into the
frequencies that make it up.
For fourier transform of square pulse x(t)=(1-e-jωt/jω).

Procedure :
1. Open matlab
2. Open new m-file
3. Type the program
4. Save in current directory
5. Compile and run the program

Program:
Clc;
Clear all;
w=0:0.1:3.14;
T=2;
j=sqrt(-1);
f=(1-exp(-j*w*T))./(j*w);
A=abs(f);
P=angle(f);
subplot(2,1,1);
plot(w,A);
xlabel('Frequency');
ylabel('Amplitude');
title('Amplitude spectrum')
subplot(2,1,2);
plot(w,P)
xlabel('Frequency');
ylabel('Angle');
title('Phase spectrum')

Results : The graphical form of fourier transform of square pulse was obtained.

DEPARTMENT OF ECE
UID- 16BEC1161
DEPARTMENT OF ELECTRONICS & COMM.ENGG

Output :

For t=2 and ω=0:0.1:3.14 For t=50 and ω=0:0.1:3.14

For t=-5 and ω=-3:0.001:3

DEPARTMENT OF ECE
UID- 16BEC1161

You might also like