精选优质文档-倾情为你奉上function ca=CAgenerate(number) %CA码的生成number=input(请输入1-32之间的一个整数:); G1=ones(1,10);G2=ones(1,10);m=ones(1,3);Code2=zeros(1,1);G2Table=2,3,4,5,1,2,1,2,3,2,3,5,6,7,8,9,1,2,3,4,5,6,1,4,5,6,7,8,1,2,3,4; 6,7,8,9,9,10,8,9,10,3,4,6,7,8,9,10,4,5,6,7,8,9,3,6,7,8,9,10,6,7,8,9;for i=1:1023R(1)=mod(G2(G2Table(1,number)+G2(G2Table(2,number),2);rd(i)=mod(R(1)+G1(10),2);newBit1=mod(G1(3)+G1(10),2);G1=newBit1 G1(1:9);newBit2=mod(G2(2)+G2(3)+G2(6