📄 tu1-25.m
字号:
clear;
SNR_dB=20;
SNR=10.^(SNR_dB./10);
n_R=4;n_T=4;
alfa_r=40./180.*pi;
for d_bi_lamda=[0.5 1 2 3 4 5 10]
simtimes=80000;
C_E(simtimes)=0;%init
SitaR=sitaRfun(d_bi_lamda,n_R, alfa_r);
for s=1:simtimes
H=(randn(n_R,n_T)+j.*randn(n_R,n_T))./sqrt(2);
C_E(s)=1./n_T.*log2(det(eye(n_R,n_R)+SNR./n_R.*SitaR'*H*H'));
end
dx=0.01;
[c,xout] = hist(real(C_E), 0:dx:10);
pdf=c./simtimes./dx; %pdf fun
%plot(xout,pdf);
%sum(pdf).*dx %verify pdf fun
plot(xout, 1-cumsum(pdf).*dx);hold on;
axis([0 7 0 1.0]);grid on;
end
xlabel('容量n/(bit/s/Hz)');
ylabel('大于横坐标的概率 [容量n>横坐标的概率]');
text(4.02,0.42,'λ/2');
text(5.2,0.42,'λ');
text(5.5,0.42,'2λ--10λ');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -