help-octave
[Top][All Lists]
Advanced

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

Re: Passing parameters to fsolve function - new syntax?


From: David Bateman
Subject: Re: Passing parameters to fsolve function - new syntax?
Date: Wed, 05 Oct 2005 11:54:25 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

Aivo Jürgenson wrote:

Hello,

I have a function f(x,a,b,c), which I would like solve for variable x, so that f(x,a,b,c)=0, where a,b,c are parameters, which are known at the time of solving.

However, current fsolve function in Octave only supports one-variable functions. I suppose there is a work-around to declare specific global variables and then giving values to those variables before calling the fsolve function, but this doesn't seem to be a clean way of organizing this.

The fsolve FIX in the octave-forge package seems to expand this functionality, but I'm not able to compile it. Also, the status of this FIX seems to be unclear, as in the development mailing list message http://sourceforge.net/mailarchive/message.php?msg_id=11922522:

Paul Kienzle, in May, 2005:

I have no interest in maintaining this function.  I am removing it from
the build system for now, and will purge it completely if nobody steps
forward to update it.

IIRC, the purpose of this function is to pass extra arguments to
fsolve, but we can do this now with the new syntax:

    @(x) f(x,a,b,c)

- Paul


Could somebody explain this new syntax? I would be happy to use this new and official way of passing extra arguments to fsolve, but I'm not been able to find any examples of doing it.

Aivo Jürgenson, address@hidden

Aivo,

The new syntax is not supportted in the CVS. I wrote a patch to support it which was a huge hack, which you can find at

http://www.octave.org/mailing-lists/octave-maintainers/2004/627

together with the explanation of why this is the wrong way to go.. Note that the changes to "quad" were made. However daspk, dasrt, dassl, fsolve, lsode and odessa weren't converted as the resulting code is an ugly hack. The only real solution is to completely dump the existing mess for these functions and reimplement it removing the underlying fortran code.... So the workaround with global variables is the only way this can be done...

Regards
David

--

David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



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