精选优质文档-倾情为你奉上clear;clc;%输入编码参数,m:校验节点数目,n:变量节点数目(注意码率R不一定为1/2)%构造任意码率的LDPC校验矩阵m=input(The number of check nodes:);n=input(The number of variable nodes:);h=zeros(m,n);%将边的度转化为变量节点的度%给定变量节点度分布序列 dv=0.38354*x+0.04237*x2+0.57409*x3A=7,0,0,0,0,0,0 2,3,6,7,20,21,22 0.1989,0.2305,0.0068,0.2774,0.14267,0.1335,0.0102 0,0,0,0,0,0,0;total=0; for j=1:A(1,1) total=total+A(3,j)/A(2,j); end for i=1:A(1,1) A(4,i)=round(n*(A(3,i)/A(2,