资源简介
构造围长8列重4的准循环的LDPC码的MATLAB源码
代码片段和文件信息
% This program constructs coumn-weight four girth 8 quasi-cyclic LDPC codes given
% k( row weight j(column weight) is fixed at 4) and m (size of each sub-matrix). The
% program constructs a distance graph first then converts it into a matrix.
% For details of the algorithm see PhD thesis by G.Malema LDPC codes: Construction and Implementation
%(University of Adelaide 2007) and other publications.
% Author : Dr. Gabofetswe Alafang MalemaUniversity of Botswana
% Department of Computer science. e-mail: malemag@mopipi.ub.bw
j=4; % column-weight should be fixed at 4.
k=8; % row-weight is variable.
m=130; % size of each sub-matrix.is variable.
M=j*m; % total number of rows.
shift=zeros(kj); % stores shift values for each sub-matrix.
rows = struct(‘connect‘0‘counter‘0‘con‘0); % structure used for storing connections.
emptyset = [];
for y = 1:M % connections and number of connections for rows and columns are initialized.
rows(y).counter = 0;
rows(y).con = intersect(emptysetrows(y).con);
rows(y).connect = intersect(emptysetrows(y).connect);
%rows(y).mem = intersect(emptysetrows(y).mem);
end
group1 = [1:m]; %row group one
group2 = [m+1:2*m]; % row group two
group3 = [2*m+1:3*m]; % row group three these groups are connected to group one.
group4 = [3*m+1:4*m];
g= 1; % determines the girth of the code in these case 8.
found_code = 1; % true if algorithm does not fail.
% the for loop finds a rows(from groups 123) that are apart at atleast a distance
% of 8. They are then connected. The rest of the groups are connected
% according to this first connection. The process is repeated k times which
% is the number of connections for each row.
for kk = 1:k
r1 = ceil(rand*length(group1)); % randomly choose a row from group1
i = group1(r1);
%while rows(i).counter < k
mem=[]; mem1 = rows(i).con;
mem2 = [];
for y = 1:g
%mem2 = [];
for x = 1:length(mem1)
x1 = mem1(x);
mem2 = union(mem2rows(x1).con);
end
mem = union(mem1mem2);
mem1=mem;
end
% find row not in mem in the given range.
A = intersect(memgroup2);
A = setxor(Agroup2);
if (isempty(A)~=1)
r1 = ceil(rand*length(A));
row1 = A(r1);
else
disp(‘Row two not found‘);
found_code = 0;
break;
end
% create list of neighbors at a distance of 6 or less for row1.
mem3 = []; mem1=rows(row1).con;
mem2 = [];
for b = 1:g
%mem2 = [];
for x = 1:length(mem1)
x1 = mem1(x);
mem2 = union(mem2rows(x1).con);
end
mem3 = union(mem1mem2);
mem1 = mem3;
end
mem3 = union(mem3row1);
% Find row 2 not in mem or mem3 at a distance of atleast 7.
check1 = intersect(memgroup3);
chec
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6444 2009-05-20 07:28 girth84rr.m
文件 1338 2009-05-20 07:28 license.txt
- 上一篇:磁感应强度测定结果的MATLAB仿真
- 下一篇:matlab曲面拟合
相关资源
- LDPC 的编译码MATLAB仿真
-
SIMUli
nk仿真实现LDPC信道编码 - LDPC的matlab 仿真 BP算法 BPSK调制
- LDPC BP算法
- qc_ldpc矩阵构造
- 基于MATLAB的LDPC码的仿真
- LDPC编码的matlab实现
- matlab的LDPC实现
- LDPC在AWGN性能仿真
- QC-LDPC码的校验矩阵构造
- ldpc ms算法
- ldpc迭代算法
- 简单有效的LDPC码BP译码算法 MATLAB
- LDPC码的matlab仿真
- LDPC码MATLAB仿真实现
- LDPC的MATLAB编译码程序
- 170421NMS算法matlab程序
- ldpc的译码matlab程序
- LDPC码的编译码程序
- 本程序是LDPC的Matlab便解码实现
- 研究LDPC码的性能
- LDPC的多种源代码实现
- LDPC码的PEG构造算法
- Matlab仿真程序实现LDPC低密度奇偶校验
- ldpc编解码的实现
- LDPC编码matlab
- QC_LDPC 校验矩阵构造函数matlab
- 基于MATLAB的LDPC编译码仿真程序
-
LDPC编码 simuli
nk仿真 - LDPC编码构造的matlab实现
评论
共有 条评论