[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41146] Different results for fsolve in versio
[Octave-bug-tracker] [bug #41146] Different results for fsolve in version 3.4.3 vs. 3.2.4
Thu, 09 Jan 2014 05:26:57 +0000
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Update of bug #41146 (project octave):
Status: None => Invalid
Open/Closed: Open => Closed
Follow-up Comment #3:
First, versions 3.2 and 3.4 are absolutely ancient and are no longer
supported. You want to upgrade to 3.8 which is the latest stable release.
See the downloads page (http://www.gnu.org/software/octave/download.html).
Have a look at the documentation for fsolve by using
from within Octave.
The INFO code from fsolve tells whether the algorithm succeeded or not. From
On return, FVAL contains the value of the function FCN evaluated
at X, and INFO may be one of the following values:
Converged to a solution point. Relative residual error is
less than specified by TolFun.
Last relative step size was less that TolX.
Last relative decrease in residual was less than TolF.
Iteration limit exceeded.
The trust region radius became excessively small.
So for 3.2.4 the return code was 0 which means that the algorithm did not
converge because the iteration limit was exceeded. The fact that the answer
looks better is not meaningful since the return code says that the algorithm
failed. For version 3.4.3 the return code was 3 which is also a failure.
Like most optimization algorithms, the solver is sensitive to the initial
point where you begin searching from. I got the algorithm to converge by
changing the initial point and allowing it to run a bit longer with more
[x, fval, info] = fsolve (@f, [1; 0; 0], optimset ("MaxIter", 1e3))
info = 1
This isn't a bug in Octave, just normal variation with respect to convergence
for a non-linear solver.
Reply to this item at:
Message sent via/by Savannah