From help-request at octave dot org Sun Feb 6 19:57:32 2005 Subject: Re: two quadratic eq, please help From: Vic Norton To: help at octave dot org Date: Sun, 6 Feb 2005 21:02:34 -0500 So we have proved that a quadratic equation can have two solutions. I will really be impressed if octave can find more than two! ;-) My question is this. Why should one bother using a high powered numerical language for an elementary exercise? This is a philosophical point. Personally I believe it is important to recognize trivialities, no matter the power of the machinery you have at hand. Two circles can intersect in two points, one point, or they might not intersect at all. That is all we are talking about here. Anybody with a hand calculator should be able to figure out where these two circles intersect (if they intersect at all). To hell with high level numerical languages. That is my two bits worth. Regards, Vic At 5:15 PM -0700 2/6/05, Dmitri A. Sergatskov wrote: >Geordie McBain wrote: > >> >>Create a function to return the residual: >> >> function z = f (x) >> z = [(12-x(1))^2+x(2)^2-15^2, (16+x(2))^2+x(1)^2-25^2]; >> endfunction >> >>and fsolve it: >> >>octave> fsolve ("f", [0, 0]) >>ans = >> >> 1.8887e-15 >> 9.0000e+00 >> > >and: > >octave:5> fsolve ("f", [24, -9]) >ans = > > 24 > -9 > >:) > >and so forth :) > >>Geordie McBain >>www.aeromech.usyd.edu.au/~mcbain >> > >Regards, > >Dmitri. >-- ------------------------------------------------------------- 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 -------------------------------------------------------------