⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 max_length.m

📁 In 揚erformance of multi-carrier DS CDMA Systems?we apply a multi-carrier signaling technique to a di
💻 M
字号:
function  [seq] = max_length(connection);
% ----------------------------------------------------------------------- %
connection = fliplr(connection);
% number of registers
m = length(connection)-1;  

% length of sequences
L = 2^m-1;

%initial condition
register = [zeros(1,m-1),1]; 
initial = register;
seq(1) = register(1);  
for i=2:L
	for j=1:m-1,
   	new_reg_cont(j) = register(j+1);
   end;
   new_reg_cont(m) = register(1);
   for k=2:m
      new_reg_cont(m) = new_reg_cont(m)+register(k)*connection(k);
      new_reg_cont(m) = mod(new_reg_cont(m),2);
	end;
   register = new_reg_cont;
   seq(i) = register(1); 
   if (initial==register)
      disp('the connection is not valid to generate maximum length sequences');
      break
   end
end

%find other all sequences
for a = 2:L
   seq(a,:) = wshift('1D',seq(a-1,:),1);
end
% ----------------------------------------------------------------------- %

⌨️ 快捷键说明

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