###
MATLAB program for FM signal generation

__Program Code__

% FM signal generation

clc;

close all;

clear all;

fc=input('Please enter the carrier signal frequency in Hz,fc=');

fm=input('Please enter the modulating signal frequency in Hz,fm=');

m=input('Modulation index,m=');

n=0:0.0001:.1;

c=sin(2*pi*fc*n);

M=sin(2*pi*fm*n);

subplot(311);

plot (n,c);

ylabel('Amplitude');

xlabel('Time index');

title('Carrier signal ');

subplot(312);

plot (n,M);

ylabel('Amplitude');

xlabel('Time index');

title('Modulating Signal');

y=sin(2*pi*fc*n+(m.*sin(2*pi*fm*n)));

subplot(313);

plot (n,y);

ylabel('Amplitude');

xlabel('Time index');

title('Frequency Modulated signal');

__Example of Output__

Please enter the carrier signal frequency in Hz,fc=1000
Please enter the modulating signal frequency in Hz,fm=250
Modulation index,m=2

thank you very much

ReplyDeleteYou are always welcome, respected sir.

DeletePlease feel free to visit this blog http://s5electronicsandcommunication.blogspot.com , whenever you feel like. Thank you very much for spending your precious time, to visit this humble blog and to thank me. I felt honored to hear it from you. I am happy to know that you found this MATLAB program useful. I am greatly obliged to you. It is the support of people like you, that keep this blog going. Most humbly, I request you to share the link to this page http://s5electronicsandcommunication.blogspot.com/2012/10/matlab-program-for-fm-signal-generation_21.html on Facebook and Whatsapp, so that more people may read this program.

Wish you and your family good health, everlasting happiness and success. May your friends and all your well-wishers be always happy and healthy.