isi_encoding.m

来自「用Matlab仿真turbocode的算法」· M 代码 · 共 22 行

M
22
字号
function [output2_int,state2_int]=isi_encoding(g2,st_t2,out_t2,output1_bin)%coding for each ISI channel%to get expected output(without noise) and the last state of ISI channeln=length(output1_bin);mem2=size(g2,2)-1;output2_int=zeros(1,n+mem2); state2_int=1;   %'++...+'for input=1:n    output2_int(input)=out_t2(state2_int,(output1_bin(input)-1)/(-2)+1);    state2_int=st_t2(state2_int,(output1_bin(input)-1)/(-2)+1);endcode_ter=zeros(1,length(mem2));for input=1:mem2  %mem2 tail bits    [dummy,dummy,v]=find(g2(1,2:end).*bin_state(state2_int-1,mem2,'bipolar'));    code_ter(input)=prod(v);       output2_int(n+input)=out_t2(state2_int,(code_ter(input)-1)/(-2)+1);    state2_int=st_t2(state2_int,(code_ter(input)-1)/(-2)+1);end    

⌨️ 快捷键说明

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