|
From: | Paul Kienzle |
Subject: | Re: Nonlinear equation |
Date: | Tue, 15 Apr 2003 23:54:45 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212 |
address@hidden wrote:
Hello, Can you help me how to solve a nonlinear equation given by: x = a*y*ln(b) - a*y*ln(y) + a*y where a and b are constant parameters. I know the inital value of x0 and I want to know the value of y. Can I use Newton's method? How?
global a=7; global b=6; global x0=5; function r=g(y), global a b x0; r = a*y*log(b) - a*y*log(y) + a*y - x0; end fsolve('g',9); ans = 15.579; Paul Kienzle address@hidden ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |