1 Star 1 Fork 0

zhoub86/polar-coded-SCMA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
initPC.m 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
ZhipengPan 提交于 2018-09-19 10:19 . first submit
function [FZlookup,bitreversedindices,F_kron_n] = initPC(N,K,n,construction_method,design_snr_dB,sigma,crc_size)
F = [1 0;1 1];
BB=1;
for ii=1:n
BB = kron(BB,F);
end
F_kron_n = BB;
bitreversedindices = zeros(1,N);
for index = 1 : N
bitreversedindices(index) = bin2dec(wrev(dec2bin(index-1,n)));
end
switch construction_method
case 0
constructed_code_file_name = sprintf('constructedCode\\PolarCode_block_length_%d_designSNR_%.2fdB_method_BhattaBound.txt',N,design_snr_dB);
case 1
constructed_code_file_name = sprintf('constructedCode\\PolarCode_block_length_%d_designSNR_%.2fdB_method_MC.txt',N,design_snr_dB);
case 2
constructed_code_file_name = sprintf('constructedCode\\PolarCode_block_length_%d_sigma_%.2f_method_GA.txt',N,sigma);
otherwise
error('The range of construction_method is from 0 to 2!');
end
%should first use construct_polar_code(n) to construct the polar code
indices = load(constructed_code_file_name);
FZlookup = zeros(1,N);
if crc_size == 0
FZlookup(indices(1:K)) = -1;
else
FZlookup(indices(1:K+crc_size)) = -1;
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoub86/polar-coded-SCMA.git
git@gitee.com:zhoub86/polar-coded-SCMA.git
zhoub86
polar-coded-SCMA
polar-coded-SCMA
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385