Code covered by the BSD License  

Highlights from
Contemporary Communications Systems Matlab Files

image thumbnail

Contemporary Communications Systems Matlab Files

by

Omar Ruiz (view profile)

 

Matlab Files in this book

ip_08_03.m
% MATLAB script for Illustrative Problem 8.3.
clear
echo on
a_db=[-20:0.2:20];
a=10.^(a_db/10);
for i=1:201
  f(i)=quad('il3_8fun',a(i)-5,a(i)+5,1e-3,[],a(i));
  g(i)=quad('il3_8fun',-a(i)-5,-a(i)+5,1e-3,[],-a(i));
  c(i)=0.5*f(i)+0.5*g(i);
  echo off ;
end
echo on ;
pause % Press a key to see capacity vs. SNR plot.
semilogx(a,c)
title('Capacity versus SNR in binary input AWGN channel')
xlabel('SNR')
ylabel('Capacity (bits/transmission)')

Contact us