📄 checkno4cycles.m
字号:
% Function searches for the presence of 4-cycles in the parity check matrix H
%
% Prasanna Sethuraman, March 2004.
%
% 'row','col' is the postion in which a 1 is to be added. This function
% checks if there is a 4-cycle present in an existing H matrix.
function [no4cycle] = checkNo4Cycles(H)
dim=size(H);
M = dim(1);
N = dim(2);
no4cycle=true;
for n=1:N
for m=1:M
if H(m,n)==1
onesInRow = find(H(m,:));
for i=1:length(onesInRow)
onesInCol = find(H(:,onesInRow(i)));
for j=1:length(onesInCol)
if ( H(onesInCol(j),onesInRow(i))==1 & H(onesInCol(j),n)==1 & n~=onesInRow(i) & m~=onesInCol(j))
no4cycle=false;
return;
end;
end;
end;
end;
end;
end;
% no4cycle
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -