gold_sequence.m

来自「多用户检测算法的比较」· M 代码 · 共 11 行

M
11
字号
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;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?