% albertsheim formulas
clear
Pfa=5.8e-12;
Pd=.95;
A=log(.62/Pfa); B=log(Pd/(1-Pd));
% single pulse SNR
SNR1=A+.12*A*B+1.7*B;
disp(['Pfa = ',num2str(Pfa)])
disp(['Pd = ',num2str(Pd)])
disp(['Single pulse SNR, dB = ',num2str(10*log10(SNR1))])
n=9;
SNRn=-5*log10(n)+log10(SNR1)*(6.2+4.54/sqrt(n+.44));
disp(['Number of pulses, n = ',num2str(n)])
disp(['N pulse SNR, dB = ',num2str(SNRn)])