clc; clear all; t=-5:0.001:5; fm=input('enter the modulating signal Frequency') %fm=0.2; x=sin(2*pi*fm*t); fc=input('enter the carrier signal Frequency') %fc=4; y=cos(2*pi*fc*t); m=input('enter the modulation index'); %m=10; z=m*x; s=cos(2*pi*fc*t+z); subplot(3,1,1) plot(t,x) xlabel('time') ylabel('Amplitude') title('Modulating signal') subplot(3,1,2) plot(t,y) xlabel('time') ylabel('Amplitude') title('Carrier signal') subplot(3,1,3) plot(t,s) xlabel('time') ylabel('Amplitude') title('Frequency Modulated signal')
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
clc;
clear all;
t=-5:0.001:5;
fm=input('enter the modulating signal Frequency')
%fm=0.2;
x=sin(2*pi*fm*t);
fc=input('enter the carrier signal Frequency')
%fc=4;
y=cos(2*pi*fc*t);
m=input('enter the modulation index');
%m=10;
z=m*x;
s=cos(2*pi*fc*t+z);
subplot(3,1,1)
plot(t,x)
xlabel('time')
ylabel('Amplitude')
title('Modulating signal')
subplot(3,1,2)
plot(t,y)
xlabel('time')
ylabel('Amplitude')
title('Carrier signal')
subplot(3,1,3)
plot(t,s)
xlabel('time')
ylabel('Amplitude')
title('Frequency Modulated signal')