www.pudn.com > space-timecodingBrankaVuceticJinhongYuan.rar > IT_C_to_num.m, change:2006-12-20,size:1109b
% in this programe a highly scattered enviroment is considered. The
% Capacity of a MIMO channel with nt transmit antenna and nr recieve
% antenna is analyzed. The power in parallel channel (after
% decomposition) is distributed as water-filling algorithm
clear all
close all
clc
nt_V = [10:9:64];
nr_V = [2:2:14];
N0 = 1e-4;
B = 1;
Iteration = 1e4; % must be grater than 1e2
SNR_V_db = [0:5:30];
SNR_V = 10.^(SNR_V_db/10);
color = ['b';'r';'g';'k';'c'];
notation = ['-o';'->';'<-';'-^';'-s'];
for(k = 1 :length(nt_V))
nt = nt_V(k);
nr = nr_V(k);
for(i = 1 : length(SNR_V))
Pt = N0 * SNR_V(i);
for(j = 1 : Iteration)
H = random('rayleigh',1,nr,nt);
[S V D] = svd(H);
landas(:,j) = diag(V);
[Capacity(i,j) PowerAllo] = WaterFilling_alg(Pt,landas(:,j),B,N0);
end
end
f1 = figure(1);
hold on
plot(nt_V,mean(Capacity'))
hold on
clear landas
end
f1 = figure(1)
grid on
set(f1,'color',[1 1 1])
xlabel('ÌìÏßÊýÁ¿n')
ylabel('Capacity bits/s/Hz')