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

📄 sa_ex8_8.m

📁 Smart antennas for wireless communication - With MATLAB (Gross F.B. - 2005 - McGraw-Hill)
💻 M
字号:
%Smart Antennas  example 8.8
% Use SMI and RLS to find the correlation matrix estimate for block length K

alpha=1;
d=.5;
N=4;
K=200;
th0=45*pi/180;
n=1:N;
a0=exp(1j*(n-1)*2*pi*d*sin(th0));
S=cos(2*pi*(0:K-1)/(K-1));
vS=a0.'*S(1:K);

Rxx2=vS*vS'/K   %SMI correlation matrix for block length K

vs=a0.'*S(1);
Rxx=vs*vs';     % first correlation matrix for RLS
Rxxtr=real(trace(Rxx2))*ones(1,K);      % calculate trace
Rtrace(1)=real(trace(vs*vs'));
for k=2:K
   vs=a0.'*S(k);
   Rxx=alpha*(k-1)*Rxx/k+vs*vs'/k;
   Rtrace(k)=real(trace(Rxx));
end
figure;plot(1:K,Rtrace,'k',1:K,Rxxtr,'k--')
xlabel('Iteration no.')
ylabel('trace(R_x_x)')
axis([1 200 0 4])
legend('RLS','SMI for block K')

⌨️ 快捷键说明

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