Last active 1 month ago

amplitude_modulation.m Raw
1clc;
2clear all;
3close all;
4
5fs = 1000;
6t = 0:0.0001:0.1;
7
8Am = 1;
9Ac = 2;
10
11fm = 50;
12fc = 500;
13
14Ka = 0.5;
15
16% Modulating signal
17msg = Am * cos(2 * pi * fm * t);
18
19% Carrier signal
20carr = Ac * cos(2 * pi * fc * t);
21
22% AM Wave
23amw = Ac * (Ka * msg) .* cos(2 * pi * fc * t);
24
25% Plotting
26subplot(3,1,1);
27plot(t, msg);
28xlabel('t');
29ylabel('m(t)');
30title('Modulating Signal');
31
32subplot(3,1,2);
33plot(t, carr);
34xlabel('t');
35ylabel('c(t)');
36title('Carrier Signal');
37
38subplot(3,1,3);
39plot(t, amw);
40xlabel('t');
41ylabel('amw(t)');
42title('Modulated Signal');