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

📄 cuaveragevsmrx.m

📁 MIMO v&#7899 i Zero bu&#7897 c equalizer
💻 M
字号:
%% This file will plot the average Capacity of MIMO Channels.
%% The plots will be Capacity vs SNR, Capacity VS MRx Capacity vs. NTx, 
%% Capacity comparisons with othe channels
%close all;
clear all;
type=['o' '+' 's' '*' 'k' 'r' 'b' ':'];
colour=['k' 'r' 'b' ':'];
disp('1- Capacity vs SNR input parameters');
SNRdB=input('Input the SNR in dB >> ');
SNR=10.^(SNRdB/10);
MRx=input('Input the Range of number of Receive antennas >> ');
NTx=input('Input the vector of number of Transmit antennas up to 4 values >> ');
%it=3;
NumberOfRelizations=input('Input the number of Relizations >> ');
Cmimo1st=zeros(1,length(MRx));
AR=zeros(length(NTx),length(MRx));
%AR3=zeros(1,length(SNRArray));
subplot(2,2,2);hold on;
for ii=1:length(NTx)
    %AR(ii,:)=zeros(1,length(SNRArray));
    %NTx(ii)=input(sprintf('Input the number of Transmit antennas for the %2.0f Arrangment >> ',ii));
    %MRx(ii)=input(sprintf('Input the number of Recieve antennas for the %2.0f Arrangment >> ',ii));
    N=NTx(ii);
    clear H;
    for jj=1:NumberOfRelizations
    for mRx=1:length(MRx)
    H=sqrt(0.5)*randn(MRx(mRx),N)+i*sqrt(0.5)*randn(MRx(mRx),N);
    Cmimo1st(mRx)=log2(det(eye(MRx(mRx))+SNR/N*H*H'));
end
AR(ii,:)=AR(ii,:)+Cmimo1st;
end
AR(ii,:)=AR(ii,:)/NumberOfRelizations;
%plot(SNRArraydB,AR(ii,:),colour(ii),SNRArraydB,AR(ii,:),type(ii));
plot(MRx,AR(ii,:),type(ii));
title(sprintf('Mean Capacity vs. M^{Rx} at SNR=%2.0fdB',SNRdB));
xlabel('M^{Rx} Antennas');
ylabel('Mean Capacity bps/Hz');
end
legend(sprintf(' N^{Tx}=%2.0f',NTx(1)),sprintf('N^{Tx}=%2.0f',NTx(2)),sprintf('N^{Tx}=%2.0f',NTx(3)),sprintf('N^{Tx}=%2.0f',NTx(4)));
hold off;
CapacityUncorrelatedAverage;



    

⌨️ 快捷键说明

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