nonlinear optimization with fminunc

i want to do a nonlinear optimization with the command 'fminunc' but i get the following error :
Local minimum possible.
fminunc stopped because the size of the current step is less than the default value of the step size tolerance.
Optimization stopped because the norm of the current step, 5.960464e-007, is less than options.TolX = 1.000000e-006.
Optimization Metric Options relative norm(step) = 5.96e-007 TolX = 1e-006 (default)
can someone explain what this means?

回答 (2 件)

Sean de Wolski
Sean de Wolski 2013 年 2 月 12 日

1 投票

That's not an error!
x = linspace(0,2,100);
y1 = (10*(x-1)).^2;
y3 = 1./x;
plot(x,y1,'b-',x,y3,'r-',1,y1(50),'b*',1,y3(50),'r*')
If we look at the blue line and the blue star at x=1, the blue line has hit a minimum, i.e. it starts to go up, the sign of the gradient has changed. With the red line, we have not hit a minimum, the line still appears to be decreasing. But now the amount that it is decreasing by is below some predefined tolerance (fed as an option to fminunc() ). The blue line shows what happens with an exit flag of 1, and the red line show it with an exitflag of 3.
Alan Weiss
Alan Weiss 2013 年 2 月 13 日
編集済み: Alan Weiss 2013 年 2 月 13 日

0 投票

For more information on exit messages, see the documentation.
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

質問済み:

2013 年 2 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by