📄 capacity_main.asv
字号:
function capacity
%输出2-2系统的各态历经和截止容量
subplot(2,1,1);
ouput=capacity(2,1,0.5,1,0.5,'out');
plot(SNR,temp2,'b-^');
%plot routines follow. These will change depending upon the type of plot.
%The following routines are based on the given example above
xlabel('SNR');
ylabel('Capacity (Bits/sec)');
title('Outage Capacity Variation with SNR for Corr = 0.5 and XPD = 0.5');
subplot(2,1,2);
ouput=capacity_plot_main(2,1,0.5,1,0.5,'erg');
plot(SNR,temp2,'r-^');
%plot routines follow. These will change depending upon the type of plot.
%The following routines are based on the given example above
xlabel('SNR');
ylabel('Capacity (Bits/sec)');
title('ergodic Capacity Variation with SNR for Corr = 0.5 and XPD = 0.5');
grid;
%输出1-1、2-2、3-3、4-4系统的信道容量
output1=[];
output2=[];
for i=1:4,
output1(i,:)=capacity_plot_main(i,0,0.5,0,0.5,'out');
output2(i,:)=capacity_plot_main(i,0,0.5,0,0.5,'erg');
end
figure;
plot(SNR,output1(1,:),'r*-',SNR,output1(2,:),'b*-',SNR,output1(3,:),'k*-',SNR,output1(4,:),'g*-')
xlabel('SNR');
ylabel('Capacity (Bits/sec)');
title('Outage Capacity Variation with SNR for Corr = 0 and XPD = 0');
legend('1×1','2×2','3×3','4×4');
figure;
plot(SNR,output2(1,:),'r*-',SNR,output2(2,:),'b*-',SNR,output2(3,:),'k*-',SNR,output2(4,:),'g*-')
xlabel('SNR');
ylabel('Capacity (Bits/sec)');
title('Ergod Capacity Variation with SNR for Corr = 0 and XPD = 0');
legend('1×1','2×2','3×3','4×4');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -