Why do I obtain different results from the "Unconstrained Minimization" example within the documentation for the Optimization Toolbox?
Show older comments
The example that can be found at the documentation page generated by the command:
web([docroot '/toolbox/optim/tutoria7.html'])
states that the following commands:
x0 = [-1,1]; % Starting guess
options = optimset('LargeScale','off');
[x,fval,exitflag,output] = fminunc(@objfun,x0,options);
produce the solution:
x =
0.5000 -1.0000
...
However, I actually obtain the output:
Optimization terminated: relative infinity-norm of gradient less than options.TolFun.
Accepted Answer
More Answers (0)
Categories
Find more on Choose a Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!