线性分组码编码译码

标签:
线性分组码linearblockcode编码encode译码decode(63)杂谈 |
分类: 通信原理MATLAB仿真 |
% Chapter 15 Error Correcting Codes
% In this section, we provide MATLAB programs to illustrate
simple
% examples of block encoders and decodes. We focus on the simpler
case
% of hard-decision decoding based on syndromes.
%
% In the first experiment, we provide a program to decode
the(6,3)
% linear block code of Example 15.1.
%
% Matlab Program < Ex15_1.m >
% to illustrate encoding and decoding of (6,3) block code
% in Example 15.1
%
G=[1 0 0 1 0
1
H=[1 0
1
E=[0 0 0 0 0
0
K=size(E,1);
Syndrome=mod(mtimes(E,H'),2);
r=[1 1 1 0 1
1]
display(['Syndrom ','Error Pattern'])
display(num2str([Syndrome E]))
x=mod(r*H',2);
for kk=1:K,
end
syndrome=Syndrome(idxe,:)
error=E(idxe,:)
cword=xor(r,error)
%------------------------------------------------------------
% 参考文献
% B.P.拉兹,丁峙. 现代数字与模拟通信系统[M]. 第4版. 北京:电子工业出版社,2011:966-967
-
1. % The
linear block code is used to encode and the syndrome decoding i. - % 采用线性分组码进行编码,用伴随式译码。