📄 paritycheckmatrixh.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function checkMatrix_H = ParityCheckMatrixH()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% @author Andreas Waadt, 13. November 2005
% @param
% @return checkMatrix_H : 7 x 7 LDPC check-sum-matrix
% This function generates a 7 x 7 Parity-Check-Matrix H for LDPC-Codes.
% The Matrix is cyclic and from rank 4 (binary).
% The LDPC-Code, represented by the null-space of H has dimension 3.
% Its girth is 6. The number of ones per row (roh) an the number of ones
% per column (gamma) are 3.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% number of rows
j_rows = 7;
% number of columns
n_columns = 7;
% parity check matrix
checkMatrix_H = zeros(j_rows,n_columns);
% initialize the parity check matrix
checkMatrix_H(1,1) = 1;
checkMatrix_H(1,2) = 1;
checkMatrix_H(1,3) = 0;
checkMatrix_H(1,4) = 1;
checkMatrix_H(1,5) = 0;
checkMatrix_H(1,6) = 0;
checkMatrix_H(1,7) = 0;
% cyclic code continuation
index_n = 0;
for cnt_j = 2 : 1 : j_rows
checkMatrix_H(cnt_j,1) = checkMatrix_H(cnt_j-1,7);
for cnt_n = 2 : 1 : n_columns
checkMatrix_H(cnt_j,cnt_n) = checkMatrix_H(cnt_j-1,cnt_n-1);
end;
end;
%checkMatrix_H
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -