problem with tolx in optimset fminbnd
1 view (last 30 days)
Show older comments
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 Comment
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!