MATLAB program to find Frequency Modulation
All right in this post i will tell you about how to get frequency modulation using MATLAB software.To find a frequency modulation using MATLAB. just follow simple step as given below.
[1] . Open a MATLAB software. Then click on New -> M-file
[2]. Write this code into it.
t=0:0.001:1;
fm=3;
fc=50;
b=10;
x=sin(2*pi*fm*t);
subplot(3,1,1)
plot(t,x)
y=cos(2*pi*fc*t);
subplot(3,1,2)
plot(t,y)
z=(cos((2*pi*fc*t)+(b*x)));
subplot(3,1,3)
plot(t,z)
[3] . Now save this M-file and Run it after running you will get output like this
That's it done with program. Now if you want to find frequency modulation for different signal tan just change the signal in g(t) and carrier signals too if you wish .
[1] . Open a MATLAB software. Then click on New -> M-file
[2]. Write this code into it.
t=0:0.001:1;
fm=3;
fc=50;
b=10;
x=sin(2*pi*fm*t);
subplot(3,1,1)
plot(t,x)
y=cos(2*pi*fc*t);
subplot(3,1,2)
plot(t,y)
z=(cos((2*pi*fc*t)+(b*x)));
subplot(3,1,3)
plot(t,z)
[3] . Now save this M-file and Run it after running you will get output like this
Comments
Post a Comment