S.M. Riazul Islam, PhD
  • Home
  • Publications
  • Lectures
  • Google Scholar
  • Contact

Channel Capacity Formula in MATLAB

10/11/2016

 

Code

​clc;
clear;
B=[1,20,50,100];    % Bandwidth B in Hz
color=['r','b','m','g'];

snr_db=[0, 5, 10, 15, 20, 25, 30]; % in dB
snr=10.^(snr_db/10); % in linear scale

for i=1:1:4
 C=B(i)*log2(1+snr);        % Capacity calculation
 semilogy(snr_db,C,color(i));
 hold on;
end

title('Channel capacity formula');
xlabel('SNR (dB)');
ylabel('Capacity (bits/sec)');
grid on;
legend('show');
legend('B=1 Hz', 'B=20 Hz', 'B=50 Hz', 'B=100 Hz','Location','northwest');

.m File

Download m file

Comments are closed.

    Dr. SMR Islam

    Picture
    This is my own English Blog

    Archives

    October 2016
    May 2015
    September 2011
    May 2011
    April 2011
    April 2010

    Categories

    All
    Bangladesh
    Internet Of Things
    Uwb
    Wban
    Wireless Technology
    Wpan

    RSS Feed

Powered by Create your own unique website with customizable templates.