Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

LAB REPORT # 02

FREQUENCY MODULATION

Objective:
In this lab we learnt how to perform the frequency modulation using
MATLAB.

Software requirement:
MATLAB

Code:

clear all
close all
f=-5:0.01:5 %frequency interval
fc=5 %carrier frequency
ac=10 %carrier amplitude
am=5 %message amplitude
fm=2 %message frequency
b=1.5 %modulation index
t=0:0.01:10 %time interval
sc=ac*sin(2*pi*fc*t) %carrier signal
sm=b*(am*cos(2*pi*fm*t))/fm; %message signal
FM=ac*cos((2*pi*fc*t)+sm); %frequency modulated signal
subplot(2,2,1)
plot(t,sc)
subplot(2,2,2)
plot(t,sm)
subplot(2,2,3)
plot(t,FM)
y=(abs(fft(FM)))
length(f)
LAB REPORT # 02

length(y)
subplot(2,2,4)
plot(f,y)

OUTPUT WAVEFORM:

FREQUENCY MODULATION OUTPUT

10 4

5 2

0 0

-5 -2

-10 -4
0 2 4 6 8 10 0 2 4 6 8 10

10 3000

2500
5
2000

0 1500

1000
-5
500

-10 0
0 2 4 6 8 10 -5 0 5

You might also like