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

📄 gold_cold.m

📁 CDMA多用户检测程序
💻 M
字号:
%  function [c1,C0]=gold(fdbk)
 fdbk1=[1 0 0 1 0];
% First determine the maximal length shift-register sequences.
% Assume the initial shift-register content as "00001".
connections1=[1 0 0 1 0];
connections2=[1 0 0 1 0];
sequence1=ss_mlsrs(connections1);
sequence2=ss_mlsrs(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=[sequence2(shift_amount+1:L) sequence2(1:shift_amount)];
  gold_seq(shift_amount+1,:)=(sequence1+temp) - floor((sequence1+temp)./2).*2;
end;
% Find the max value of the cross-correlation for these sequences.
max_cross_corr=0;
for i=1:L-1,
  for j=i+1:L,
    % equivalent sequences
    c1=2*gold_seq(i,:)-1;
    c2=2*gold_seq(j,:)-1;    
  end;
end;

n2=8;
C0=zeros(n2);
for i=1:n2
s1(i+1:L)=c1(1:L-i);
s1(1:i)=c1(L-i+1:L);
for j=1:n2
s2(j+1:L)=c1(1:L-j);
s2(1:j)=c1(L-j+1:L);
C0(i,j)=s1*s2'/L;
end
end

⌨️ 快捷键说明

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