help-octave
[Top][All Lists]
Advanced

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

Re: referencing subfunctions


From: Jaroslav Hajek
Subject: Re: referencing subfunctions
Date: Wed, 3 Jun 2009 09:14:22 +0200

2009/5/31 Christian Böhme <address@hidden>:
> 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

Can you provide an example of what does not work for you? AFAIK, there
are no such special tricks in fsolve (note that it is reimplemented in
3.2.0), so most likely you either see a bug or you're doing something
wrong.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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