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

📄 demultiplex.m

📁 一个turbo码的仿真程序
💻 M
字号:
function subr = demultiplex(r, alpha, puncture);% At receiver end, serial to paralle demultiplex to get the code word of each% encoder% alpha: interleaver mapping % puncture = 0: use puncturing to increase rate to 1/2;% Frame size, which includes info. bits and tail bitsL_total = length(r)/2;% Extract the parity bits for both decoders   for i = 1:L_total       x_sys(i) = r(2*(i-1)+1);       for j = 1:2          subr(j,2*i) = 0;       end          if rem(i,2)>0          subr(1,2*i) = r(2*i);       else          subr(2,2*i) = r(2*i);       end         end% Extract the systematic bits for both decodersfor j = 1:L_total% For decoder one   subr(1,2*(j-1)+1) = x_sys(j);% For decoder two: interleave the systematic bits     subr(2,2*(j-1)+1) = x_sys(alpha(j));end    

⌨️ 快捷键说明

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