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

📄 capacity_plot_main.m

📁 通信系统仿真原理与无线应用 所有的代码
💻 M
字号:
function z=capacity_plot_main(M,corr,value,XPD,alpha,output)

%**************************************************************************
%This program works with "capacity_plot_main.m" file.Figs
%2.6,2.7,2.9,2.12 are determined using this program. It operates on
%file "capacity_plot.m"
%z=capacity_plot_main(M,corr,value,ric,k,XPD,alpha,output)
%M -> number of antennas (M x M) system
%corr -> 1 if with correlation, 0 if uncorrelated (for a 2x2 system only)
%value -> correlation coefficient value from 0 ->1
%XPD -> 1 if antenna XPD is to be investigated, 0 if not (for a 2x2 system
%only)
%alpha -> XPD value
%output -> defined by 'erg' and 'out' for ergodic capacity or outage
%capacity respectively
%EXAMPLE: capacity_plot_main(2,1,0.5,1,0.5,'out')-> determines the outage
%capacity for a 2x2 system with a correlation of 0.5 and an XPD of 0.5
%**************************************************************************

%vary SNR through 20 dB
SNR=0:1:20;%SNR is signal-to-noise ratio in dBs
temp2=[];
for i=1:length(SNR)
    temp1(i)=capacity_plot(SNR(i),M,corr,value,XPD,alpha,output);% change this file to suit requirements e.g. capacity_rician,
                                                                %    capacity_water(for water-filling) etc.
    temp2=[temp2 temp1(i)];
    temp1(i)=0;
end

plot(SNR,temp2,'b-^');
grid;

%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');

⌨️ 快捷键说明

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