|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
Pd=2000; Fd=1; Fs=4*Fd; R=0.5; Delay=5; No=1; M=4;
x1=randint (Pd,1,M); x2=randint (Pd,1,M);
y1=modmap (x1,Fd,Fs,'qask',M); y2=modmap (x2,Fd,Fs,'qask',M);
[rev_a1,ti]=rcosflt(y1,Fd,Fs,fir/sqrt/Fs,R,Delay);
[rev_a2,ti]=rcosflt(y2,Fd,Fs,fir/sqrt/Fs,R,Delay);
s1= amodce(rev_a1,10,'qam'); s2= amodce(rev_a2,10,'qam');
save sigdata s1 s2
function guess()
A=zeros(1,2000);
for j=1:2
for k=1:2000
t=rand; m=1*sqrt(2*log(1/(1-t))); t=rand; A(k)=m*cos(2*pi*t);
end
figure(j); plot(A);
end
echo on
connections1=[10100]; connections2=[11101];
sequence1=ss_mlsrs(connections1); sequence2=ss_mlsrs(connections2);
L=2^length(connection1)-1;
for shift_amount=0:L-1;
temp=[sequence2(shift_amount+1:L) sequence2(1:shift_amount)];
gold_seq(shift_amount+1, :)=(sequence+temp)-floor((sequence1+temp)./2).*2;
end;
max_cross_corr=0; fori=1:L-1;
for j=i+1:L, cl=2*gold_seq(i,:)-1; c2=2*gold_seq(j,:)-1;
for m=0:L-1;
shifted_c2=[c2(m+1:L) c2(1:m)]; corr=abs(sun(c1.*shifted_c2));
if(corr>max_cross_corr), max_cross_corr=corr; end;
end; end;
fuction[seq]=ss_mlsrs(connections);
m=length(connections); L=2^m-1; registers=[seros(1,m-1) 1]; seq(1)=register(m);
for i=2:L, new_reg_cont(1)=connections(i)*seq(i-1);
for j=2:m, new_reg_cont(j)=registers(j-1)+counections(j)*seq(i-1); end;
registers=new_reg_contl; seg(i)=registers(m)
Clear
i=sqrt(-1); j=i; m=4;p=2; angle1=0; angle2=20;
th=[angle1;angle2]; nn=1024;
SN1=10; SN2=10; sn=(SN1;SN2);
Deg2rad=pi/180;
laod sig-data
tt=1:nn; S=[s1(tt).';s2(tt).']; nr=randn(m,nn); ni=randn(m,nn);
U=nr+j*ni; Ps=S*S'/nn; ps=diag(Ps); refp=2*10.^(sn/10);
tmp=sqrt(refp./ps); S2=diag(tmp)*S; tmp=-i*pi*sin(th'*deg2rad);
tmp2=[0:m-1]'; a2=tmp2*tmp; A=exp(a2); x=A*S2+U; Rxx=X*X'/nn; Rinv=inv(Rxx);
rxd=x*S2(1,:)'/nn; w_lms=Rinv*rxd;
k=[-90;90]'; tmp=-i*pi*sin(k'*deg2rad); tmp2=[0:m-1]'
a2=tmp28tmp; Ap=exp(a2); pattem1=abs(w_lms'*Ap).^2/2; pdb1=10*log10(pattem1);
plot(k,pdb1.'-') ; axis([-90 90 -50 0]); xlabel('Antenna Pattem')
??? Delay=5;
|
Error: The input character is not valid in MATLAB statements or expressions.
[ 本帖最后由 ChaChing 于 2009-5-4 09:37 编辑 ] |
|