实验一-M序列的产生及其特性试验

更新时间:2024-03-18 14:11:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

实验一M序列的产生及其特性试验

G=63;

sd1=[0 0 0 0 1]; PN1=[]; for j=1:G

PN1=[PN1 sd1(5)]; if(sd1(1)==sd1(4)) temp1=0; else temp1=1; end

sd1(1)=sd1(2); sd1(2)=sd1(3); sd1(3)=sd1(4); sd1(4)=sd1(5); sd1(5)=temp1; end

subplot(3,1,1); stem(PN1);

title('使用生成多项式(45)8=(100101)2产生第一个m序列'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% sd2=[0 0 0 0 1]; PN2=[]; for j=1:G

PN2=[PN2 sd2(5)]; if(sd2(1)==sd2(2)) temp1=0; else temp1=1; end

if(sd2(4)==temp1) temp2=0; else temp2=1; end

if(sd2(5)==temp2) temp3=0; else temp3=1; end

sd2(1)=sd2(2); sd2(2)=sd2(3); sd2(3)=sd2(4); sd2(4)=sd2(5); sd2(5)=temp3; end

subplot(3,1,2);

stem(PN2);

title('使用生成多项式(67)8=(110111)2产生第二个m序列'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% sd3=[0 0 0 0 1]; PN3=[]; for j=1:G

PN3=[PN3 sd3(5)]; if(sd3(1)==sd3(2)) temp1=0; else temp1=1; end

if(sd3(3)==temp1) temp2=0; else temp2=1; end

if(sd3(4)==temp2) temp3=0; else temp3=1; end

sd3(1)=sd3(2); sd3(2)=sd3(3); sd3(3)=sd3(4); sd3(4)=sd3(5); sd3(5)=temp3; end

subplot(3,1,3); stem(PN3);

title('使用生成多项式(75)8=(111101)2产生第三个m序列');

本文来源:https://www.bwwdw.com/article/6i28.html

Top