⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pr8_12.m

📁 Spread Spectrum and CDMA Principles and Applications 书籍和代码
💻 M
字号:
%Problem 8.12;
%optimizing average serial search time for Rayleigh signal model;

clear all; close all;
Pc=0.999; %specify probability of correct search;
Ts=[]; Mst={}; s=1;
for M=[50,200,1000,10000]; %set search region size;
    pfmax=2*(1-Pc)/(M-1); pfmin=pfmax/100; stp=(pfmax-pfmin)/100; %range of candidate false alarm probabilities and step of their change;
    pf=[pfmin:stp:pfmax]; y=(1-pf).^(M-1);  nmb=length(pf); %vector of false alarm probabilities;
    pd=(M*Pc*(pf.*(1-y)))./(1-y.*(1+pf*(M*Pc-1))); %vector of detection probabilities;
    td=2*((log(pf)./log(pd))-1); %SNR per dwelling for Rayleigh channel;
    Ts=[Ts;(((1-Pc)./pf)+Pc./pd).*td/M]; %average acquisition time;
    Mst{s}=num2str(M);
    s=s+1;
end;
plot(pd,Ts'); xlim([0.25,0.9]); ylim([40,80]); xlabel('p_{d}'); ylabel('Ts/M'); legend(Mst); grid; %plotting dependences of acquisition time on pd for all given M;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -