I tried:
optimset('TolX', [1e-1])
but it doesn't work since when I do
optimset('fzero')
I keep having 2.2204e-016
any help is greatly appreciated,
Javier
You must pass the output of optimset
into fzero.
john
Let me just ask some basic questions, I am new in the use of the optimization toolbox...
What does TolX do? Is it about stopping criterium for changes in the value of X along the iterations.
I think what I would like is changing fzero so that an "almost zero" is returned. Would that be tolFun.
As far as I can see, fzero doesn't use it in the code?
Because of that, I was planning to use one of the bisection codes available in the web...but the "problem"
is that they don't allow for changing the values of parameters in the same way fzero does...like solve for x such that f(x,c)=0 and fix the value of c.
any suggestions really appreciated
Javier
In the context of fzero, TolX should be a
measure of the size of the interval that is
known to contain the root.
> I think what I would like is changing fzero so that an "almost zero" is
returned. Would that be tolFun.
The help for fzero says that tolx is not used,
but tolfun is not indicated.
> As far as I can see, fzero doesn't use it in the code?
No. I just now checked. It is not.
> Because of that, I was planning to use one of the bisection codes available
in the web...but the "problem"
> is that they don't allow for changing the values of parameters in the same
way fzero does...like solve for x such that f(x,c)=0 and fix the value of c.
Nothing stops you from writing your own
bisection scheme that allows you to use
a function value tolerance. Because of the
way these codes are written, a tolerance on
x is more common, and I think more logical.
That would apply to a bisection code too.
But you can do a function tolerance easily
enough.
John
Javier