📄 gold_sequence6.m
字号:
echo on
connections1=[1 0 0 0 0 1 ];
connections2=[1 1 0 0 1 1 ];
sequence1=ss_mlsrs(connections1);
sequence2=ss_mlsrs(connections2);
L=2^length(connections1)-1;;
for shift_amount=0:L-1,
temp=[sequence2(shift_amount+1:L) sequence2(1:shift_amount)];
gold_seq(shift_amount+1,:)=(sequence1+temp)-floor((sequence1+temp)./2).*2;
echo off;
end;
gold6=gold_seq(1,:);
subplot(3,1,1);
stairs(gold6);
title('n=6的Gold1序列图')
ind=find(gold_seq==0);
gold_seq(ind)=-1;
r1=abs(ccorr(gold_seq(1,:)));
r2=abs(ccorr(gold_seq(1,:),gold_seq(2,:)));
subplot(3,1,2);
plot(r1);
title('Gold1序列的自相关特性图')
subplot(3,1,3);
plot(r2);
title('Gold1序列的互相关特性图')
echo on;
maxR1=0;
maxR2=0;
for i=1:125;
if (r2(i)>maxR2),
maxR2=r2(i);
end;
if (r1(i)>maxR1),
maxR1=r1(i);
end;
echo off;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -