help-octave
[Top][All Lists]

## Re: info = 3?

 From: David Bateman Subject: Re: info = 3? Date: Sat, 06 Jan 2007 21:46:55 +0100 User-agent: Thunderbird 1.5.0.7 (X11/20060921)

```huub wrote:
> Hi,
>
> I wrote a function which with fsolve returns info = 3. What does that
> indicate?
>
> function y = wiskunde(x)
>       y(1) = 2*x(1) + 2;
>       y(2) = 2*x(1).^2 + 3*x(1) + 5;
> endfunction
>
> octave:26> [x, info] = fsolve ("wiskunde", [-5;5])
> x =
>
>      -0.76792
>     712.10156
>
> info = 3
>
> Thank you,
>
> Huub

Note fsolve maps minpack info=3,4,5 all to info = 3. From hybrd.f in
minpack (which fsolve uses)

C         INFO = 3   XTOL IS TOO SMALL. NO FURTHER IMPROVEMENT IN
C                    THE APPROXIMATE SOLUTION X IS POSSIBLE.
C
C         INFO = 4   ITERATION IS NOT MAKING GOOD PROGRESS, AS
C                    MEASURED BY THE IMPROVEMENT FROM THE LAST
C                    FIVE JACOBIAN EVALUATIONS.
C
C         INFO = 5   ITERATION IS NOT MAKING GOOD PROGRESS, AS
C                    MEASURED BY THE IMPROVEMENT FROM THE LAST
C                    TEN ITERATIONS.
C

So take your pick, all mean that the solution is approximative only...

D.

```