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



______________________________________________________


If you find this post useful, then please like this post on facebook and please recommend this post on google plus
Please send your opinion

our e-mail:
 s5electronicsandcommunication@gmail.com

2 comments:

  1. Replies
    1. You are always welcome, respected sir.
      Please 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.

      Delete