📄 cp0902_prbcoll.m
字号:
%
% Function 9.5: "cp0902_prbcoll"
%
% Evaluates the probability of error
% on the basis of the probability
% of pulse collision
%
% 'Nu' is the number of users
% 'Ns' is the number of pulses per bit
% 'Tm' is the time duration of the pulse
% 'Ts' is the average pulse repetition period
%
% 'Prb' is the estimated bit error probability
%
% Programmed by Guerino Giancola
%
function [Prb] = cp0902_prbcoll(Nu,Ns,Tm,Ts)
% --------------------------------------------------
% Step One - Evaluation of the bit error probability
% --------------------------------------------------
% Probability of collision
pr_pulsecollision = 1 - exp((2-2*Nu)*Tm/Ts);
% Probability of error for the single pulse
pr_pulseerror = 0.5 * pr_pulsecollision;
% Probability of error for the bit
n_min = ceil(Ns/2);
n_max = Ns;
Prb = 0;
for n = n_min : n_max
tmp = nchoosek(Ns,n)*(pr_pulseerror^n)*((1-pr_pulseerror)^(n_max-n));
Prb = Prb + tmp;
end % for n = n_min = n_max
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -