% Digital communication in Gaussian noise: Analytical P[error]
%
% R. Kozick, ELEC 471

SNRdB = -10:2:20;
Nvar = 10.^(-SNRdB/10);

Pe = normcdf(-1, 0, sqrt(Nvar));

figure(1)
clf
semilogy(SNRdB, Pe, 'k*-')
xlabel('SNR (dB)')
ylabel('P[error]')
title('PROBABILITY OF BIT ERROR IN GAUSSIAN NOISE')
axis([SNRdB(1), SNRdB(length(SNRdB)), 1e-10, 1])

