function MIMO
sigma=0.5;
t=1e-3;
fs=1e7;
t1=0:1/fs:t-1/fs;
n=length(t1);
randn('state',0);
u=rand(1,n);
h=sqrt(2*log2(1./u))*sigma;
for i=1:10000
H=h(i);
Q=H*H';
U(i)=log2(1+10*Q);
end
n=0;
for p=0:0.001:22
n=n+1;
UU=U<=p;
result(n)=sum(UU)/10000;
end
plot(0:0.001:22,result);
grid