problem with tolx in optimset fminbnd

Hello.. this is the code
[x,fval,exitflag] = ...
fminbnd('x.^2+exp(-x)',0,1,optimset('TolX',0.005,'Display','iter'));
and this is the output
Func-count x f(x) Procedure
1 0.381966 0.828416 initial
2 0.618034 0.920969 golden
3 0.236068 0.845455 golden
4 0.35285 0.827186 parabolic
5 0.351183 0.827184 parabolic
6 0.349516 0.827191 parabolic
Optimization terminated: the current x satisfies the termination criteria using OPTIONS.TolX of 5.000000e-03
according to my understanding tolx is calculated by Xi+1 - Xi isn't ?
if yes, then why isn't terminated at the 5th step where X5-X4 < tolx (whcih is 0.005) !!!
any help would be appreciated
thnx

1 commentaire

Rich
Rich le 4 Oct 2017
Did you ever figure this out? I am observing the same thing (R2017b)

Connectez-vous pour commenter.

Réponses (0)

Catégories

Question posée :

sam
le 28 Nov 2014

Commenté :

le 4 Oct 2017

Community Treasure Hunt

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

Start Hunting!

Translated by