Hello,
I am using R2011b (7.13.0.564), 32-bit (glnx86) on Ubuntu 12.04LTS (since I installed my Ubuntu at 32 bit).
I try to set the options through optimset as follows:
x0 = 3e-7;
options = optimset('Display','iter','TolX',1e-5);
options.TolX = 1.000000e-07;
[x, resnorm] = lsqnonlin(@test18062014,x0);
x, resnorm
Here the function test18062014 yields a vector of size 4 with a minimum sum of squares around 2.67e-7. Thee output is as follows:
Local minimum possible.
lsqnonlin stopped because the size of the current step is less than
the default value of the step size tolerance.
<stopping criteria details>
x =
3.0904e-07
resnorm =
8.4427
Optimization stopped because the norm of the current step, 3.094088e-09,
is less than options.TolX = 1.000000e-06.
Optimization Metric Options
norm(step) = 3.09e-09 TolX = 1e-06 (default)
>>
There are two things I don't understand.
1. Why is TolX not changed? I even changed it twice, just to make sure.
2. How come I end up at 3.09e-7, which is further away (but rather close to) the minimum at 2.67e-7?
I am mainly worried about the first one (including why I don't get to see any iterations, despite asking for it).
Thank you in advance!

 채택된 답변

Matt J
Matt J 2014년 6월 18일
편집: Matt J 2014년 6월 18일

1 개 추천

  1. You set the options correctly. You just never passed the options struct to lsqnonlin.
  2. The toolbox algorithms don't always walk a straight line path between x0 and the solution. For one thing, the straight line path may point uphill, initially. Most algorithms seek downhill paths. Whatever path the algorithm does choose, it will stop at the first point satisfying stopping criteria.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

질문:

2014년 6월 18일

편집:

2014년 6월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by