getgirth.m
来自「LDPC codes .Using the matlab.」· M 代码 · 共 32 行
M
32 行
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function girth = GetGirth(checkMatrix_H)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% @author Andreas Waadt, 13. November 2005
% @param checkMatrix_H : the parity check matrix of the code
% @return girth : the girth of checkMatrix_H
% This function calculates the girth of a Parity-Check-Matrix H
% (checkMatrix_H). That's the length of the shortest cyclic way
% through the tanner graph of checkMatrix_H;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% checkMatrix_H = ParityCheckMatrixH()
sizeOfMatrix = size(checkMatrix_H);
% number of rows (check sums, check nodes)
j_rows = sizeOfMatrix(1);
girth = 10^16;
for start_node = 1:1:j_rows
tmp_girth = CalcGirth(checkMatrix_H,start_node);
if( tmp_girth < girth )
girth = tmp_girth;
end;
if( girth <= 4 )
break;
end;
end;
%girth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?