% File: E7_132.M

clear;


% Select the modulation index B=Beta
B = 2;

fprintf('\nFor the modulation index, Beta=%g\n',B);


SNRbdB = 0:1:35;


for (i = 1:1:length(SNRbdB))
  R(i) = 10^(SNRbdB(i)/10);
  SNRo(i) = 1.5*B^2*R(i)/(1+(12*B/pi)*R(i)*exp(-R(i)/(2*(B+1))));
  SNRodB(i)=10*log10(SNRo(i));
end;

fprintf('\nSee Window for plot. Compare with Fig. 7-24.\n');
plot(SNRbdB,SNRodB);
xlabel('SNRbdB');
ylabel('SNRodB');
title('Output (S/N)dB for FM, Compare with Fig. 7-24.');





