help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lsode example: different info results?


From: Richard O. Legendi
Subject: lsode example: different info results?
Date: Mon, 13 Dec 2010 13:05:09 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Hi all,

I would ask another question about the `fsolve()` function. I tried to execute the following example found in the Octave manual:

        http://sunsite.univie.ac.at/textbooks/octave/octave_19.html

It says that I should get `info = 1` as a result. However, when I execute the statements I get the following (different) result:

octave:1> function y = f (x)
>   y(1) = -2*x(1)^2 + 3*x(1)*x(2)   + 4*sin(x(2)) - 6;
>   y(2) =  3*x(1)^2 - 2*x(1)*x(2)^2 + 3*cos(x(1)) + 4;
> endfunction
octave:2> [x, info] = fsolve ("f", [1; 2])
x =

   0.57983
   2.54621

info =

  6.1872e-008  -3.2708e-007

octave:3>

The documentation says that value should be 1 to make sure the convergence, and != 1 results should yield to an error message. However, when I pass it to `perror` (as suggested in the documentation) I get the following error:

octave:3> perror("fsolve", 6.1872e-008)
error: strerror: unrecognized error code for fsolve
error: called from:
error: c:\007\progz\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\general\strerr
or.m at line 57, column 7
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: c:\007\progz\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\general\perror
.m at line 36, column 5
octave:3>

Any help would be greatly appreciated. Oh yes, and I'm using Octave version 3.2.4_gcc-4.4.0 under Windows 7 x64.

Thanks in advance,
Richard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]