[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Need help for KSpread Maths
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       1999-11-17 13:49:56
[Download RAW message or body]

There several decent ways to do this, most involving iterative methods.
Some standard ways to do it are Newton-Raphson or Gauss-Seidal iteration.
Both these are fairly simply and the solution is found by repeating the
calculation until the error bound is reached. They can both be performed
on matrices in order to solve equations with several unknowns. Any decent
text on numerical methods should have some example. It doesn't matter
if the inital search range is large as most of the methods will either
quickly converge to a result, or will fail completely (for example if
the range includes several local maxima or minima) - if this happens
you can either try again with a new range or try a second method with
the same range.

I probably have some old BBC basic code knocking around for them that
I wrote when I was at school, but I think this would probably be more
harm than good.

Rich.

weis wrote:
> 
> Hi,
> 
> Excel has this "Goal Seek". Nice thing. You point it to a formular
> and to the cell that is used as input and Excel finds the
> input value that makes the formula result in a user specified value.
> 
> In fact that is the problem of finding x in f(x) = 0.
> 
> There are many algorithms which help you here, but they want
> a) a range [a,b] to search in which can be very big with double values.
> b) two points a and b, so that f(a)*f(b) < 0.
> 
> Can anyone tell me what to do here. Excel is getting quick and good
> results, so there must be a way.
> 
> Bye
> Torben
> 
> PS: No algebraic solutions.

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard@robocast.com
http://developer.kde.org/	rich@kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic