-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample7_10.m
More file actions
33 lines (26 loc) · 752 Bytes
/
Example7_10.m
File metadata and controls
33 lines (26 loc) · 752 Bytes
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
% File: Example7_10.m for Examle 7-10
clear;
clf
SNRbdB = 10:1:35;
% Select the modulation index B=Beta
B = 10;
B1 = B;
for (i = 1:1:length(SNRbdB))
R(i) = 10^(SNRbdB(i)/10);
SNRo(i) = 1.5*B^2*R(i)/(1+(12*B/pi)*R(i)*exp(-R(i)/(2*(B+1))));
SNRodB1(i)=10*log10(SNRo(i));
end;
% Select the modulation index B=Beta
B = 2;
B2 = B;
for (i = 1:1:length(SNRbdB))
R(i) = 10^(SNRbdB(i)/10);
SNRo(i) = 1.5*B^2*R(i)/(1+(12*B/pi)*R(i)*exp(-R(i)/(2*(B+1))));
SNRodB2(i)=10*log10(SNRo(i));
end;
fprintf('\nSee Window for plot. Compare with Fig. 7-24.\n');
plot(SNRbdB,SNRodB1,'-',SNRbdB,SNRodB2,'--');
xlabel('SNRbdB -->');
ylabel('SNRodB -->');
title(['FM Output (S/N)dB for Bf = ',num2str(B1),' (solid) and Bf = ',num2str(B2),' (dashed)']);