[Top][All Lists]

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

Re: Trouble with fsolve

From: David Bateman
Subject: Re: Trouble with fsolve
Date: Tue, 18 Oct 2005 17:17:40 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

Adam C Powell IV wrote:


I'm trying to solve a system with a function of more than one parameter:

[x,fval] = fsolve(@hello_calc,x_guess,options,z3,Param);

where hello_calc is declared later in the same file:

function [fval]=hello_calc(x,z3,Param)

This works just fine in MATLAB, but in octave I get:

error: evaluating for command near line 40, column 1
error: called from `hello' in file `hello.m'

Can octave fsolve not deal with functions of more than one parameter?
That seems to be suggested by the "man page" for fsolve which comes up
after the error is displayed...


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

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 a workaround with global variables is the only way this can be done at the moment in octave..


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:
How to fund new projects:
Subscription information:

reply via email to

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