⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h_gen.m

📁 LDPC码在TD-SCDMA系统中的应用仿真程序
💻 M
字号:
function [h,A,B]=h_gen(rows,cols)

%%%%%%%%%%%%define dimension of the parity check matrix%%%%%%%% 
% rows=100; 
% cols=200; 
h=gen_ldpc(rows,cols);%generates a 100 x 200 H matrix( the IG parity 
                      %check matrix) 
[newh,rearranged_cols]=rearrange_cols(h); 
% newh holds the rearranged version of H and rearranged_cols holds 
%the rearrangement order of columns 
%%%%%%%%%%%%Get A and B matrices %%%%%%%%%%%%%%%% 
for i=1:rows 
    for j=1:rows 
        A(i,j)=newh(i,j); 
    end 
end 
for i=1:rows 
    for j=rows+1:cols 
        B(i,j-rows)=newh(i,j); 
    end 
end 

return
%%%%%%%%%%%%%%message bits%%%%%%%%%%%%%%%%%%%%% 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -