?? threshold.m
字號:
function [pfa, vt] = threshold (nfa, np)
% This function calculates the threshold value from nfa and np.
% The newton-Raphson recursive formula is used (Eq.s (2-63) through (2-66))
% This function uses "incomplete_gamma.m".
delmax = .00001;
eps = 0.000000001;
delta =10000.;
pfa = np * log(2) / nfa;
sqrtpfa = sqrt(-log10(pfa));
sqrtnp = sqrt(np);
vt0 = np - sqrtnp + 2.3 * sqrtpfa * (sqrtpfa + sqrtnp - 1.0);
vt = vt0;
while (abs(delta) >= vt0)
igf = incomplete_gamma(vt0,np);
num = 0.5^(np/nfa) - igf;
temp = (np-1) * log(vt0+eps) - vt0 - factor(np-1);
deno = exp(temp);
vt = vt0 + (num / (deno+eps));
delta = abs(vt - vt0) * 10000.0;
vt0 = vt;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -