[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with fsolve
From: |
N.D.vanForeest |
Subject: |
problem with fsolve |
Date: |
Tue, 14 Aug 2001 12:12:21 +0200 |
Hi,
I would like to use fsolve to solve an equation of the type f(x;a)==0,
where x is the variable that needs to be found, and a is a vector of
parameters. For instance,
function y = solve_rho(x)
y(1) = x(1)*theta +log(1-x(1)*ksi);
endfunction
Clearly I would like to pass the values of theta and ksi to the function
solve_rho, but without declaring them as global. Does anyone know how to
do this? (As far as I understand the manual does not say anything about
this.)
I tried to pass theta and ksi as the components x(2) and x(3) and set
y(1) = x(1)*theta +log(1-x(1)*ksi);
y(2) = 0.;
y(3) = 0;
but this did not help. fsolve then changes the values of y(2) and y(3).
Thanks for the help.
bye
Nicky
math department University Twente, The Netherlands
-------------------------------------------------------------
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
-------------------------------------------------------------
- problem with fsolve,
N.D.vanForeest <=