fig4_12.m
上传用户:szahd2008
上传日期:2020-09-25
资源大小:1275k
文件大小:1k
源码类别:

传真(Fax)编程

开发平台:

Matlab

  1. % This program is used to produce Fig. 4.12
  2. clear all
  3. pfa = 1e-10;
  4. nfa = log(2) / pfa;
  5. index = 0;
  6. for snr = -10:.5:30
  7.    index = index +1;
  8.    prob1(index) =  pd_swerling2 (nfa, 1, snr);
  9.    prob10(index) =  pd_swerling2 (nfa, 10, snr);
  10.    prob50(index) =  pd_swerling2 (nfa, 50, snr);
  11.    prob100(index) =  pd_swerling2 (nfa, 100, snr);
  12. end
  13. x = -10:.5:30;
  14. plot(x, prob1,'k',x,prob10,'k:',x,prob50,'k--', ...
  15.    x, prob100,'k-.');
  16. axis([-10 30 0 1])
  17. xlabel ('SNR - dB')
  18. ylabel ('Probability of detection')
  19. legend('np = 1','np = 10','np = 50','np = 100')
  20. grid