in reply to Polynomial equation algorithm

Heres a vague answer to your vague question:

Polynomial

("Searching CPAN" is usually a good algorithm)

C.

Replies are listed 'Best First'.
Re: Re: Polynomial equation algorithm
by Jaap (Curate) on Nov 07, 2003 at 11:23 UTC
    The question is not vague. The man has a set of n (x,y) coordinates that he wants to plot a polynomial of the nth order through.

    Let's say our polynomial looks like this:
    y = a0 + a1 x + a2 x2 + a3 x3 + ... + an xn

    If we fill in the (x,y) pairs in this equation, we get n equations and since we have n unknowns (a0 .. an) we can solve the equations. This is usually done in matrix form.