help-octave
[Top][All Lists]
Advanced

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

Re: lsode example: different info results?


From: Richard O. Legendi
Subject: Re: lsode example: different info results?
Date: Mon, 13 Dec 2010 13:34:01 +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

Ahh, now I see it, thx!

Sorry, I sticked with the first documentation I found in Google, thanks for the clarification, now it works!

Best regards,
Richard

On 2010.12.13. 13:16, c. wrote:

On 13 Dec 2010, at 13:05, Richard O. Legendi wrote:

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

Why are you looking at that page rather than at the official octave manual:
http://www.gnu.org/software/octave/doc/interpreter/Nonlinear-Equations.html#Nonlinear-Equations
?

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])

The manual you are looking at refers to a VERY old version of Octave (2.0.13, 
that's from about 13 years ago!! and it was not even an official stable 
release!!) which is most likely not the one you have installed.
The manual for 3.2.4 I linked above describes the new calling sequaence:

[x, fvec, info] = fsolve ("f", [1; 2])

HTH,
c.


reply via email to

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