bound_bsc_r12_k3_k4_hard.m

来自「详细讲述纠错码的书籍」· M 代码 · 共 33 行

M
33
字号
% Name: bound_BSC_R12_K3_K4_hard.m
% Date: October 19, 2005
% Description:
% Bounds for binary rate-1/2 convolutional codes over a BSC.
%
% Copyright (c) 2006. Robert Morelos-Zaragoza. All rights reserved.

clear

rate=1/2;
p = 0.001:0.0001:0.05;
x = sqrt(4*p.*(1-p));

% Bound for the memory-2 encoder
Pb1 = (((1+x)/2).*x.^5./((1-2*x).^2)) ...
    + (((1-x)/2).*-x.^5./((1+2*x).^2));

% Bound for the memory-3 encoder
Pb2 = ( ((1+x)/2) .* ( ((1-2*x-x.^3).*(x.^7+2*x.^6-2*x.^8) + ...
                  (x.^7+x.^6-x.^8).*(2*x+x.^3))./ ((1-2*x-x.^3).^2) ) ) ...
    + ( ((1-x)/2) .* ( ((1+2*x+x.^3).*(-x.^7+2*x.^6-2*x.^8) + ...
                    (-x.^7+x.^6-x.^8).*(-2*x-x.^3))./ ((1+2*x+x.^3).^2) ) );

% Plot the results
loglog (p,Pb1,'-');
hold on
loglog (p,Pb2,':');
axis ([0.001 0.1 1e-6 0.1])
set(gca,'XDir','reverse')
grid on
xlabel('p')
ylabel('P_b')
legend('m=2','m=3')

⌨️ 快捷键说明

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