|
请高手给我解读如下的算法思想
a=80;b=0.02;aoverb=a/b
mu=4002; s=96;
t=mu;
step=0.1;
var=0.01;
vp=mu*normcdf(t,mu,s)-s^2*normpdf(t,mu,s);
if vp>aoverb
while(vp-aoverb)>var
t=t-step;
vp=mu*normcdf(t,mu,s)-s^2*normpdf(t,mu,s);
end
end
if vp<aoverb
while(aoverb-vp)>var
t=t+step;
vp=mu*normcdf(t,mu,s)-s^2*normpdf(t,mu,s);
end
end |
|