encoderm.m

来自「迭代多用户检测的MATLAB详细实现,非常全面,主要基于Vincent Poor」· M 代码 · 共 42 行

M
42
字号
function en_output = encoderm( x, g, alpha, puncture )% Copyright Nov. 1998 Yufei Wu% MPRG lab, Virginia Tech.% for academic use only% uses interleaver map 'alpha'% if puncture = 1, unpunctured, produces a rate 1/3 output of fixed length% if puncture = 0, punctured, produces a rate 1/2 output % multiplexer chooses odd check bits from RSC1 % and even check bits from RSC2% determine the constraint length (K), memory (m) % and number of information bits plus tail bits.[n,K] = size(g); m = K - 1;L_info = length(x); L_total = L_info + m;  % generate the codeword corresponding to the 1st RSC coder% end = 1, perfectly terminated;input = x;en_output = rsc_encode(g,input,1);% make a matrix with first row corresponing to info sequence% second row corresponsing to RSC #1's check bits.% third row corresponsing to RSC #2's check bits.% interleave input to second encoder% paralell to serial multiplex to get output vector% puncture = 0: rate increase from 1/3 to 1/2;% puncture = 1; unpunctured, rate = 1/3;% antipodal modulation: +1/-1en_output = 2 * en_output - ones(size(en_output));

⌨️ 快捷键说明

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