mat7labs的个人空间 https://blog.eetop.cn/1631436 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

LDPC校验矩阵的高阶环的测试程序

已有 2047 次阅读| 2019-8-10 15:13 |系统分类:其他

echo off;

%确定矩阵参数
dim=size(H);
rows=dim(1);
cols=dim(2);

cycle8num = 0;
cycle8(:,4) = 0;

for irow1 = 1:rows
    for jcol1 = 1:cols
        if H(irow1,jcol1) ==1;
            onesInRow1 = find(H(irow1,:));
            for ilevel1=1:length(onesInRow1)
                jcol2 = onesInRow1(ilevel1);
                if jcol2 > jcol1
                    onesInCol2 = find(H(:,jcol2));
                    for jvertical1 = 1:length(onesInCol2)
                        irow2 = onesInCol2(jvertical1);
                        if irow1~=irow2
                            onesInRow2 = find(H(irow2,:));
                            for ilevel2 = 1:length(onesInRow2)
                                jcol3 = onesInRow2(ilevel2);
                                if jcol3 > jcol2
                                    onesInCol3 = find(H(:,jcol3));
                                    for jvertical2 = 1:length(onesInCol3)
                                        irow3 = onesInCol3(jvertical2);
                                        if irow2~=irow3
                                            onesInRow3 = find(H(irow3,:));
                                            for ilevel3 = 1:length(onesInRow3)
                                                jcol4 = onesInRow3(ilevel3);
                                                if jcol4 > jcol3
                                                    onesInCol4 = find(H(:,jcol4));
                                                    for jvertical3 = 1:length(onesInCol4)
                                                        irow4 = onesInCol4(jvertical3);
                                                        if irow3~=irow4
                                                             onesInRow4 = find(H(irow4,:));
                                                             for ilevel4 = 1:length(onesInRow4)
                                                                 jcol5 = onesInRow4(ilevel4);
                                                                 if jcol5 ==jcol1&&jcol5~=jcol4
                                                                     cycle8num = cycle8num + 1;
                                                                     cycle8(cycle8num,:) = [jcol1,jcol2,jcol3,jcol4];
                                                                 end;
                                                             end;
                                                        end;
                                                    end;
                                                end;
                                                
                                            end;
                                        end;
                                    end;
                                end;
                            end;
                        end;
                    end;
                end;
            end;
        end;
    end;
end;
%cycle8 = replace(cycle8)
% H=[1 0 0 0 1;1 0 1 0 1;0 0 1 0 1]

点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 2

    粉丝
  • 0

    好友
  • 3

    获赞
  • 2

    评论
  • 访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-29 14:31 , Processed in 0.015992 second(s), 11 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部