www.pudn.com > work_2.rar > cnv_encd.m


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);