problj.m

来自「Describes how to find the theta value in」· M 代码 · 共 23 行

M
23
字号
function prob = ProbLJ (E_N,n,m,h)
Pe_HBH1 =0;
RhoVal = RhoLJ(n,m,h);

for l=1:m
    
%    AJ_b = 0; % Setting the initial value for Aj (0 0 0 0 0)
    % Changing the value of Aj and getting different bit sequence
    for j=1:m
        % for a given Eb/No We find the Q value for different Al and Aj
        % sequence and add them up 
        Q_in = n*E_N*(1-RhoVal(l,j));
        % Get the results of the Q function and add them for all the
        % different sequence and a given E_N
        Pe_HBH1 = Pe_HBH1 + q(sqrt(Q_in));

%        AJ_b = AJ_b + 1;
    end

%    AL_b = AL_b + 1;
end
% For a given Eb/No we get the Probabilty of Error
prob = (1/m)*Pe_HBH1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?