maximizer of a function including integral
古いコメントを表示
I want to get the maximizer of a function contain integral
function f = score(g)
g = [b0, b1, a];
integral = @(x) (exp(b0+b1*x)./(1+a*exp(b0+b1*x))).^yi.*(1./(1+a*exp(b0+b1*x))).^(1/a).*exp(-(x-mi).^2/(2*tau));
f = -log(quadl(integral, mi-5*sqrt(tau), mi+5*sqrt(tau)));
where yi and mi are given (the data), g is the variable I want to solve, x is the integration variable.
I used the function
fminsearch(@(g) score(g), g0)
to get the maximizer. However, the warning
...
In fminsearch at 320
...
Warning: Maximum function count exceeded; singularity likely.
keep popping out.
What can I do to check the program and improve it? The problem itself should be theoretically sound, but I'm not quite familiar with the numerical algorithm.
Thank you so much!!!
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!