clc;
close all;
clear;
workspace;
format long g;
format compact;
fontSize = 15;
Am=5;
Ac=10;
t= linspace(0, 0.04, 1500);
Fm=50;
Fc=1000;
m=Am*cos(2*pi*Fm*t);
c=Ac*cos(2*pi*Fc*t);
subplot(2,3,1);
plot(t,m);
xlabel('time', 'FontSize', fontSize);
ylabel('m(t)', 'FontSize', fontSize);
title('Signal Equation', 'FontSize', fontSize);
ax = gca
ax.XAxisLocation = 'origin'
subplot(2,3,2);
plot(t,abs(m));
xlabel('time', 'FontSize', fontSize);
ylabel('m(t)', 'FontSize', fontSize);
title('Signal Amplitude', 'FontSize', fontSize);
subplot(2,3,3);
plot(t,c);
xlabel('time', 'FontSize', fontSize);
ylabel('c(t)', 'FontSize', fontSize);
title('Carrier Equation', 'FontSize', fontSize);
ax = gca
ax.XAxisLocation = 'origin'
subplot(2,3,4);
plot(t,abs(c));
xlabel('time', 'FontSize', fontSize);
ylabel('c(t)', 'FontSize', fontSize);
title('Carrier Amplitude', 'FontSize', fontSize);
ax = gca
ax.XAxisLocation = 'origin'
y=m.*c;
subplot(2,3,5);
plot(t,y);
xlabel('time', 'FontSize', fontSize);
ylabel('m(t) .* c(t)', 'FontSize', fontSize);
title('Multiplication of m(t) with c(t)', 'FontSize', fontSize);
ax = gca
ax.XAxisLocation = 'origin'
subplot(2,3,6);
plot(t,abs(y));
xlabel('time', 'FontSize', fontSize);
ylabel('y(t)', 'FontSize', fontSize);
title('Amplitude of the multiplication', 'FontSize', fontSize);
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
set(gcf, 'Toolbar', 'none', 'Menu', 'none');
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
Best Answer