gold_sequence.m
上传用户:bizsale
上传日期:2015-08-05
资源大小:3k
文件大小:0k
- function [gold_seq] = gold_sequence(connections1,connections2)
- m_seq1 = m_sequence(connections1);
- m_seq2 = m_sequence(connections2);
- % cyclically shift the second sequence and add it to the first one
- L = 2^length(connections1)-1;
- for shift_amount = 0:L-1,
- temp = [m_seq2(shift_amount+1:L) m_seq2(1:shift_amount)];
- gold_seq(shift_amount+1,:) = (m_seq1+temp) - floor((m_seq1+temp)./2).*2;
- % gold_seq(shift_amount+1,:) = mod(m_seq1+temp,2);
- end;