help-octave
[Top][All Lists]
Advanced

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

Re: fsolve bug? and strange behavior


From: Paul Kienzle
Subject: Re: fsolve bug? and strange behavior
Date: Mon, 13 Jun 2005 07:27:16 -0400

On Jun 12, 2005, at 12:31 PM, Matthias Heiler wrote:
Second, in the script below, if the function fn is already defined
before calling calc_yield then this definition is used instead of the
one inside the script.  This seems wrong since it makes it essentially
impossible to securely write functions with fsolve inside.  (You never
can be sure which function happens to get solved.)

Use @fn inside the function.

Third, the global definition in the script doesn't make the variables
really global.  I.e., they are not available on top level after the
script is executed.  I think, this is a good thing, but contrasts to
the description given by "help global".

At the toplevel you have to say "global v" to access the global symbol.

- Paul



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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