encoderm.m

来自「是一个对mimo连续相位调制系统的均衡程序」· M 代码 · 共 29 行

M
29
字号
function en_output = encoderm(x, g)


% 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;
output1 = rsc_encode(g,input);

% 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.

y(1,:) = output1(1:2:2*L_total);
y(2,:) = output1(2:2:2*L_total);

for i = 1:L_total
   for j = 1:2
      en_output(1,2*(i-1)+j) = y(j,i);
   end
end

⌨️ 快捷键说明

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