📄 no4cycles.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 whether a 4-cycle is formed if a one is added at (row,col) in the
% existing H matrix.
function [no4cycle] = no4cycles(H, row, col)
onesInRow = find(H(row,:));
dim=size(H);
M = dim(1);
N = dim(2);
no4cycle=true;
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),col)==1 & col~=onesInRow(i) & row~=onesInCol(j))
no4cycle=false;
return;
end;
end;
end;
% no4cycle
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -