snr14 = [2,3,4];
ber14 = [0.023110,0.003990,0.000407];

snr28 = [2,3,4];
ber28 = [0.007270,0.000935,0.000047];

snr35 = [2,3,4];
ber35 = [0.007470,0.000433,0.000024];

snr56 = [2,3,4];
ber56 = [0.004910,0.000357,0.000026];

snr100 = [4.0,4.1,4.2,4.35,4.5,4.8];
ber100 = [0.000018,0.000010,0.000014,0.000006,2.9412e-06,1.3831e-6];

snrtheory = 1:0.05:6;
bertheory = 36*qfunc(sqrt(10*power(10,0.1*snrtheory)));

snrtbnd = 1:0.05:6;
for m = 1:length(snrtbnd)
	bertbnd(m) = calc_transfer_bound(.5*10^(.1*snrtbnd(m)));
end

figure(1);
hold off
semilogy(snrtheory,bertheory,'b-');
hold on
semilogy(snrtbnd,bertbnd,'b-');
semilogy(snr14,ber14,'ko-','markersize',15);
semilogy(snr28,ber28,'kx-','markersize',15);
semilogy(snr35,ber35,'go-','markersize',15);
semilogy(snr56,ber56,'mo-','markersize',15);
semilogy(snr100,ber100,'r*','markersize',20);
hold off
grid on
legend('approx.','Transfer Function Bound','depth 14','depth 28','depth 35',...
	'depth 56','depth 100')
xlabel('SNR (dB)')
ylabel('BER')
title('BER vs. SNR, g(D) = [1+D^2+D^3+D^5+D^6, 1+D+D^2+D^3+D^6]')
