help-octave
[Top][All Lists]
Advanced

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

referencing subfunctions


From: Christian Böhme
Subject: referencing subfunctions
Date: Sun, 31 May 2009 21:38:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.1.19) Gecko/20081204 Iceape/1.1.14 (Debian-1.1.14-1)

Hello,

I have been using fsolve() for a while now more or less successfully
and found that I'd like to be able to solve equations with functions
in a broader class than is possible with MINPACKs HYBRD.

I set out to implementing the solver in a separate function (having
its own file) whose arguments are references to problem-specific
functions supplied by the caller and implemented elsewhere.  As
was the case with fsolve(), these functions are anonymous functions
with the sole purpose of calling the actual problem-specific function
binding to it all problem-specific arguments from the environment in
which they were defined.

The difficulty now is that these problem-specific functions (that
are called in turn by the supplied anonymous functions) are not
visible to the function that implements the solver.  What is it
in fsolve()'s implementation that allows me to call subfunctions
implemented in other files inside an anonymous function and having
fsolve() see them ?  How can I replicate this behaviour in my
Octave code ?


Thanks & regards,
Christian


reply via email to

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