clc;
clear;
close all;

fs=10000;
t=0:1/fs:0.05;

Am=2;
Ac=4;
fm=50;
fc=1000;

mu=Am/Ac;

m_t=Am*cos(2*pi*fm*t);
c_t=Ac*cos(2*pi*fc*t);
s_t=Ac*(1+mu*cos(2*pi*fm*t)).*cos(2*pi*fc*t);

figure('Name','Amplitude Modulation(AM)');
subplot(3,1,1);
title(['Message Signal m(t) (fm= ',num2str(fm),' Hz)']);
plot(t,m_t,'b','LineWidth',1.5);
xlabel('Time (s)');
ylabel('Amplitude (V)');
grid on;

subplot(3,1,2);
title(['Carrier Signal c(t) (fc= ',num2str(fc),' Hz)']);
plot(t,c_t,'r','LineWidth',1.8);
xlabel('Time (s)');
ylabel('Amplitude (V)');
grid on;

subplot(3,1,3);
title(['Message Signal s(t) (mu= ',num2str(mu),')']);
plot(t,s_t,'g','LineWidth',2);
ylabel('Amplitude (V)');
xlabel('Time (s)');
grid on;

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: