?? checkno4cycles.m
字號(hào):
% 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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -