求大神帮我看一下这个MIMO程序,毕设求帮助,MATLAB运行不了
Nt=2;Nr=3;t=0.1%functionf=mimo_channel(Nr,Nt,t)%功能:产生带有相关性MIMO信道的信道冲激响应%输入参数说明:(1)Nr接...
Nt=2;
Nr=3;
t=0.1
%function f=mimo_channel(Nr,Nt,t)
%功能:产生带有相关性MIMO信道的信道冲激响应
%输入参数说明:(1)Nr接收天线的阵元的个数。(2)Nt发送天线阵元的个数。(3)时间变量
%输出参数说明:mimo_channel MIMO信道的信道冲激响应矩阵
%程序:单径信道利用Jakes模型仿真。移动速度是3km。
% function f=mimo_channel(Nr,Nt,t)
s=35;% mm=0;
fd=5.56;
rand('state',0)
for i=1:Nt*Nr
for l=1:1
h1=0;
h2=0;
for k=1:s-1
sita(k)=2*pi*rand;
h1=h1+sqrt(2)/sqrt(s-1/2)*sin(pi*k/(s-1))*cos(2*pi*fd*cos(pi*k/(2*s-1))*t+sita(k));
h2=h2+sqrt(2)/sqrt(s-1/2)*cos(pi*k/(s-1))*cos(2*pi*fd*cos(pi*k/(2*s-1))*t+sita(k));
end
sita(s)=rand;
h1=h1+1/(sqrt(2)*sqrt(s-1/2))*cos(2*pi*fd*t+sita(s));
h2=h2+1/(sqrt(2)*sqrt(s-1/2))*cos(2*pi*fd*t+sita(s));
h(i,l)=h1+j*h2;
end
end
corrR=mimo_corr(30,0,0.5,3); % correlation at Rx d=0.5lanbuda
corrT=mimo_corr(5,0,5,Nt); % correlation at Tx d=5lanbuda
corrRT=kron(corrR,corrT);
hr=transpose(chol(corrRT));
h=hr*h;
for p=1:Nr
for q=1:Nt
hh(p,q)=h(Nr*(q-1)+p);
end
end
f=hh; 展开
Nr=3;
t=0.1
%function f=mimo_channel(Nr,Nt,t)
%功能:产生带有相关性MIMO信道的信道冲激响应
%输入参数说明:(1)Nr接收天线的阵元的个数。(2)Nt发送天线阵元的个数。(3)时间变量
%输出参数说明:mimo_channel MIMO信道的信道冲激响应矩阵
%程序:单径信道利用Jakes模型仿真。移动速度是3km。
% function f=mimo_channel(Nr,Nt,t)
s=35;% mm=0;
fd=5.56;
rand('state',0)
for i=1:Nt*Nr
for l=1:1
h1=0;
h2=0;
for k=1:s-1
sita(k)=2*pi*rand;
h1=h1+sqrt(2)/sqrt(s-1/2)*sin(pi*k/(s-1))*cos(2*pi*fd*cos(pi*k/(2*s-1))*t+sita(k));
h2=h2+sqrt(2)/sqrt(s-1/2)*cos(pi*k/(s-1))*cos(2*pi*fd*cos(pi*k/(2*s-1))*t+sita(k));
end
sita(s)=rand;
h1=h1+1/(sqrt(2)*sqrt(s-1/2))*cos(2*pi*fd*t+sita(s));
h2=h2+1/(sqrt(2)*sqrt(s-1/2))*cos(2*pi*fd*t+sita(s));
h(i,l)=h1+j*h2;
end
end
corrR=mimo_corr(30,0,0.5,3); % correlation at Rx d=0.5lanbuda
corrT=mimo_corr(5,0,5,Nt); % correlation at Tx d=5lanbuda
corrRT=kron(corrR,corrT);
hr=transpose(chol(corrRT));
h=hr*h;
for p=1:Nr
for q=1:Nt
hh(p,q)=h(Nr*(q-1)+p);
end
end
f=hh; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询