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!!!

Answers (0)

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Asked:

on 15 Feb 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!