Graphics Programs Reference
In-Depth Information
if (sw_case == 3)
Pd_Sw3 = 0.001;
snr_inc = 0.1 - 0.005;
while(Pd_Sw3 <= pd)
snr_inc = snr_inc + 0.005;
Pd_Sw3 = pd_swerling3(nfa, np, snr_inc);
end
PD_SW3 = Pd_Sw3
SNR_SW3 = snr_inc
Lf = SNR_SW3 - SNR_SW5
end
% *************** End Swerling 3 case ************
% *************** Swerling 4 case ****************
if (sw_case == 4)
Pd_Sw4 = 0.001;
snr_inc = 0.1 - 0.005;
while(Pd_Sw4 <= pd)
snr_inc = snr_inc + 0.005;
Pd_Sw4 = pd_swerling4(nfa, np, snr_inc);
end
PD_SW4 = Pd_Sw4
SNR_SW4 = snr_inc
Lf = SNR_SW4 - SNR_SW5
end
% *************** End Swerling 4 case ************
return
Listing 2.26. MATLAB Program Ðfig2_15.mÑ
% Use this program to reproduce Fig. 2.15 o f text
clear all
close all
index = 0.;
for pd = 0.01:.05:1
index = index + 1;
[Lf,Pd_Sw5] = fluct_loss(pd, 1e-9,1,1);
Lf1(index) = Lf;
[Lf,Pd_Sw5] = fluct_loss(pd, 1e-9,1,4);
Lf4(index) = Lf;
end
pd = 0.01:.05:1;
figure (2)
plot(pd, Lf1, 'k',pd, Lf4,'K:')
xlabel('Probability of detection')
Search WWH ::




Custom Search