0
$\begingroup$

Hi,

How can I generate the equation of a curve that matches all arbitrarily given (x,y) pairs? I would like a polynomial of nth degree, where n does not matter, as long as the curve passes thru all the given points.

I guess this problem is NP-complete. If so, how do I find the closest matching curve in a feasible amount of time?

Furthermore; how do I generate a piecewise polynomial, in case the given (x,y) pairs are discontinuous, or they draw the shape of a, say, circle?

Thanks in advance.

$\endgroup$
1
  • 4
    $\begingroup$ This question will surely get closed, since it's not at research level. Look up Lagrange interpolation. $\endgroup$ Commented Feb 5, 2011 at 22:17

1 Answer 1

2
$\begingroup$

Actually, there is an easy and standard procedure (Lagrange Interpolation) that does this. See:

http://en.wikipedia.org/wiki/Lagrange_polynomial

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged .