Pre-ci test passed git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
37 lines
1.2 KiB
Matlab
37 lines
1.2 KiB
Matlab
function [CAP] = capacity_SU_TDMA_CL_ML(H,SNR,normalize)
|
|
%
|
|
% [CAP] = capacity_SU_TDMA_ML(H,SNR,normalize)
|
|
%
|
|
% This function calculates the multiuser (MU) capacity of the channel
|
|
% assuming a time-shared single user (SU) MIMO tranmission and a ML receiver.
|
|
% The channel gains are normalized, such that E(|h_{i,j}|^2) = 1 hold for
|
|
% each user. The avaraging is done over all snapshots and all frequencies.
|
|
%
|
|
% PARAMETERS
|
|
% - H is the input channel (NRx,NTx,Nfreq,NFrames,NUser)
|
|
% - SNR is the considered SNR (Linear)
|
|
% - normalize is a flag that indicates if the channel should be normalized
|
|
%
|
|
% RETURNS
|
|
% - CAP is the capacity values
|
|
|
|
% Authors: florian.kaltenberger@eurecom.fr
|
|
% Copyright: Eurecom Sophia Antipolis
|
|
% Created: 17/10/2007
|
|
% Modified last: 12/12/2007 by florian.kaltenberger@eurecom.fr
|
|
|
|
[NRx,NTx,NFreq,Nframes,NUser] = size(H);
|
|
N_SNR = length(SNR);
|
|
|
|
if nargin<3
|
|
normalize = 1;
|
|
end
|
|
|
|
CAP_SU = zeros(NUser,Nframes*NFreq,N_SNR);
|
|
|
|
for k=1:NUser
|
|
CAP_SU(k,:,:) = capacity_SU_CL_ML(H(:,:,:,:,k),SNR,normalize);
|
|
end
|
|
%CAP = mean(CAP_SU,2);
|
|
CAP = reshape(CAP_SU,NUser*Nframes*NFreq,N_SNR);
|