% File: Fig7_05.M

clear;

% x is Eo/No in dB
x = -1:0.5:15;

% Generating Pu(x), Pp(x), and Pb(x)

Pu = zeros(length(x),1);
Pp = zeros(length(x),1);
Pb = zeros(length(x),1);

for (i = 1:1:length(x))
  Pu(i) = sqrt(10^(x(i)/10));
  Pp(i) = sqrt(2*10^(x(i)/10));
  Pb(i) = sqrt(10^(x(i)/10));
end;

Pu = q(Pu);
Pp = q(Pp);
Pb = 1.5*q(Pb);

fprintf('\nSee Window for plot.\n');

% Plotting results
semilogy(x,Pu,':',x,Pp,'-',x,Pb,'--');
xlabel('EbNodB');
title('BER for Polar(solid), Unipolar(dotted), and Bipolar(dashed)');
%axis;




