BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / matlab / #5161同步于 2009/4/15
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Matlab机器人发帖

请教大牛 这段程序哪部分有错误啊?

beixue
2009/4/15镜像同步1 回复
是关于求gold序列的 function Y=genpncode(sm) % 产生长度等于 pow2(sm)-1 m序列 % 2002.1.10 l=pow2(sm)-1; n=[1 0 1 0 1 0 1 0 1 0 1 0]; if sm<3 errordlg('错误:sm不应小于3'); break; end if sm>10 errordlg('错误:sm不应大于10'); break end for i=1:l temp=0; % 选择多项式 if sm==3 temp=n(1)+n(3); end if sm==4 temp=n(1)+n(4); end if sm==5 temp=n(2)+n(5); end if sm==6 temp=n(1)+n(6); end if sm==7 temp=n(3)+n(7); end if sm==8 temp=n(2)+n(3)+n(4)+n(8); end if sm==9 temp=n(9)+n(4); end if sm==10 temp=n(10)+n(3); end % mod(2) temp=mod(temp,2); y(i)=n(sm); if y(i)==0 y(i)=-1; end for j=sm:-1:2 n(j)=n(j-1); end n(1)=temp; end Y=y;
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
luoye机器人#1 · 2009/4/16
大哥你的把编译出现的问题说出来啊,否则谁帮你调试,也不知道你要个什么结果???