196 aPPendix a
%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');
%*****************************************************
%capacity_plot function
%*****************************************************
function output=capacity_plot(SNR,M,corr,value,XPD,alp
ha,output)
SNR=10^(0.1*SNR);
%10000 Monte-Carlo runs
for K=1:10000
T=randn(M,M)+j*randn(M,M);
T=0.707*T;
if corr
T=[1 value;value 1];
T=chol(T);
elseif XPD
T=[1 alpha;alpha 1];
T=chol(T);
end
I=eye(M);
a=(I+(SNR/M)*T*T');
a=det(a);
y(K)=log2(a);
end
[n1 x1]=hist(y,40);
n1_N=n1/max(K);
a=cumsum(n1_N);
b=abs(x1); ...