www.pudn.com > work_2.rar > cnv_encd3.m
function the_output1=cnv_encd3(mybit) %the_output1为完全正确译码,编码输出结果多出2*移位寄存器个数; the_output2为不完全译码,译码结果与编码之前的原始信息差移位寄存器的个数
g=[1 1 1 0 1 1];
n=length(mybit);
juzhen=zeros(n,(n-1)*2+6); %多余个数=2*约束长度-2=2*移位寄存器个数
for i=1:n
juzhen(i,(i-1)*2+1:(i-1)*2+6)=g;
end
the_output=mybit*juzhen;
the_output=mod(the_output,2);
the_output1=the_output;
the_output2=the_output(1,1:n*2);