Problem with unconstrained optimization fminunc 'quasi-newton'
Show older comments
I tried to find the minimum of a function with the algorithm 'quasi-newton', but a message appeared to me. It says
"Local minimum possible. fminunc stopped because it cannot decrease the objective function along the current search direction."
The followed path is detailed step-by-step below:
1)
function out =G(x)
a=x(1);
b=x(2);
out=(2*a.^2+8*b.^2-4*a)./exp(a.^2+b.^2-2*a-1);
end
2)x0=[1,0];
3)opts = optimoptions(@fminunc, 'Algorithm', 'quasi-newton');
4)[xopt,fopt]=fminunc(@G,x0,opts);
%It should work, because it seems to be rigorously done following all the rules. Nevertheless I suppose there is something wrong.
iterations: 1
funcCount: 12
stepsize: []
lssteplength: []
firstorderopt: 1.0729e-06
algorithm: 'quasi-newton'
message: 'Local minimum possible.…
Thank you very much in advance
Answers (1)
Alan Weiss
on 16 Nov 2015
0 votes
If you want to examine the quality of the solution, see the documentation on "local minimum possible".
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Solver-Based Nonlinear Optimization 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!