[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: to solve nonlinear equation
From: |
etienne grossmann |
Subject: |
Re: to solve nonlinear equation |
Date: |
Mon, 17 Apr 2000 08:47:46 +0100 (WEST) |
Hello,
using your example, you could do :
function y = test (x)
global t ;
y(1) = x(2) - exp (-x(1));
y(2) = x(1) - x(2)^3 - t;
end
global t
t = 1
x=zeros(2,10);
info=zeros(1,10);
for i=1:10,
t=1+0.1*i;
[x(:,i),info(i)]=fsolve("test",[0;0]);
end
Hth,
Etienne
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------