-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample5_04.m
More file actions
64 lines (48 loc) · 1.08 KB
/
Copy pathExample5_04.m
File metadata and controls
64 lines (48 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% File: Example5_04.m for Example 5-4
clear;
clf
Ac = 1
fc = 4;
fa = 1;
Ta = 1/fa;
dt = 2*Ta/200;
wc = 2*pi*fc;
wa = 2*pi*fa;
t = 0:dt:2*Ta;
% Sinusoidal modulation is
x = sin(wa*t);
x = x(:);
% Obtain the Hilbert Transform from Table A-7
y = -cos(wa*t);
y = y(:);
carrierx = cos(wc*t);
carrierx = carrierx(:);
carriery = sin(wc*t);
carriery = carriery(:);
% Using Eq (5-16), evaluate the USSB waveform
s = Ac*(x.*carrierx - y.*carriery)
subplot(311)
axis([0 2*Ta -1.5 1.5]);
plot(t,x,t,y,':');
xlabel('t');
ylabel('x(t) (solid), y(t) (dotted)');
axis([0 2 -1.2 1.2])
title('Quadrature Modulating Signals');
subplot(312);
plot(t,cos(wc*t));
xlabel('t');
ylabel('cos(wc*t)');
axis([0 2 -1.2 1.2])
title('Suppressed Carrier Waveform');
% Note that the frequency of s(t) is now fc+fa
% instead of fc. This is UPPER SSB.
fprintf(['\nNote that the frequency of s(t) is now fc+fa\n'])
fprintf(['instead of fc of the suppressed carrier waveform.\n'])
fprintf(['Thus s(t) is UPPER SSB.\n\n'])
subplot(313);
plot(t,s);
xlabel('t');
ylabel('s(t)');
axis([0 2 -1.2 1.2])
title('Upper SSB Signal');