Thursday, December 12, 2019

Program to plot SNR versus channel capacity for different MIMO systems using MATLAB



Program to plot SNR versus channel capacity for different MIMO systems using MATLAB

Program :-


clc;

clear all;

close all;

SNR=0;

for i=1:10;

    SNR=SNR+2;

     C=log(1+10^(SNR/10)/log(2));

     X(i)=SNR

     Y(i)=C

end

figure();

plot(X,Y);

hold on;

NR=2;

SNR=0;

for i=1:10;

    SNR=SNR+2;

    for j=1:1000;

         C(j)=NR*log(1+(10^(SNR/10))*(abs(normrnd(0,1))))/log(2);

    end

    X(i)=SNR;

    Y(i)=mean(C);

   

end

 plot(X,Y);

 NR=3;

SNR=0;

for i=1:10;

    SNR=SNR+2;

    for j=1:1000;

         C(j)=NR*log(1+(10^(SNR/10))*(abs(normrnd(0,1))))/log(2);

    end

    X(i)=SNR;

    Y(i)=mean(C);

   

end

 plot(X,Y);

 NR=4;

SNR=0;

for i=1:10;

    SNR=SNR+2;

    for j=1:1000;

         C(j)=NR*log(1+(10^(SNR/10))*(abs(normrnd(0,1))))/log(2);

    end

    X(i)=SNR;

    Y(i)=mean(C);

   

end

 plot(X,Y);

 xlabel('SNR');

ylabel('Channel capacity');

title('SNR vs Channel capacity for different MEMO system');

Output:-

output of MIMO system using matlab




  

0 comments:

If you have any doubts,please let me know