help-octave
[Top][All Lists]
Advanced

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

Re: Must all coefficients for fsolve be numeric???????


From: Kai Torben Ohlhus
Subject: Re: Must all coefficients for fsolve be numeric???????
Date: Tue, 17 Mar 2020 18:40:43 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/16/20 7:38 AM, ttonon wrote:
> I try to define a set of nonlinear simultaneous equations that have
> coefficients that I defined in statements made previously to the statements
> that define "function" definition.  These coefficients were defined as
> algebraic constants calculated from previous numerically defined parameters,
> and immediately after the line defining them, their proper numeric
> evaluation appeared: for instance, A = 0.5.  I then used A in the function
> definition as a coefficient.  For instance, one term in one of the
> "function" equations appears as A*X(1), where X(1) is one of several
> independent variables to be solved for using the fsolve command.  When I
> make the fsolve command, I get an error message saying A is undefined,
> despite the previous "A = 0.5" appearing in a previous statement, showing
> that "A" is stored as a numeric value in memory.  Why?  Even more, I would
> like to define other coefficients, such as the form B = X(1)*X(20); i.e.,
> coefficients that are themselves functions of the independent variables.  My
> question is, is fsolve restricted to equations that have only numeric
> constants as coefficients of the terms involving the independent variables? 
> If that's the case, is there any command in Octave that can solve any
> nonlinear set of algebraic equations with coefficients that are previously
> stored in memory, and defined as sub functions of the independent variables
> of the equation set?
> 

Thank you for your verbose description.  I think it is much clearer, if
you sent us a meaningful excerpt of your code you try to apply to fsolve.

Kai




reply via email to

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