% File: E7_070.M

clear;

n = 6;
ep = -1:-1:-8;
M = 2^n;

SNRout = zeros(length(ep),1);
for (i = 1:1:length(SNRout))
  SNRout(i) = 3*M^2/(1+4*(M^2-1)*10^(ep(i)));
end;

SNRoutdB = 10*log10(SNRout);

plot(ep,SNRoutdB);
xlabel('ep');
ylabel('SNRoutdB');
title('(S/N)pk for PCM');
fprintf('\nCompare plot with Figure 7-17 for M=%g\n',M);




