cnv_encd.m

来自「实现(2」· M 代码 · 共 12 行

M
12
字号
function the_output1=cnv_encd(mybit)
g=[1 1 1 0 1 1 1 1 0 0 0 1 1 1];
n=length(mybit);
juzhen=zeros(n,(n-1)*2+14);                %多余个数=2*约束长度-2=2*移位寄存器个数
for i=1:n
    juzhen(i,(i-1)*2+1:(i-1)*2+14)=g;
end
the_output=mybit*juzhen;
the_output=mod(the_output,2);
the_output1=the_output;
the_output2=the_output(1,1:n*2);

⌨️ 快捷键说明

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