www.pudn.com > zxb.rar > main.m
fbconnection = [0 1 0 0 1];
mseq = m_sequence(fbconnection);
fbconnection1 = [0 0 1 0 1];
fbconnection2 = [0 1 1 1 1];
goldseq = gold_seq(fbconnection1,fbconnection2);
ind1 = find(mseq == 0);
mseq(ind1) = -1;
ind2 = find(goldseq == 0);
goldseq(ind2) = -1;
r1 = ccorr(mseq);
r2 = ccorr(goldseq(1,:));
r3 = ccorr(goldseq(1,:),goldseq(2,:));
N = length(mseq);
axis = -N+1:N-1;
plot(axis,r1,axis,r2,'-.',axis,r3,':');
xlabel('k');
ylabel('R(k)');
legend('m序列自相关特性','Gold序列自相关特性','Gold序列互相关特性');