Interpolate |
Syntax |
Interpolate(Points:LIST, Values:LIST):POLY where Points is a list of lists of coefficients representing a set of distinct points and Values is a list of the same size containing numbers from the coefficient ring. |
Description |
Example |
X := Interpolate(Pts, Vals); Foreach Element In X Do PrintLn Element; EndForeach; Use QQ[x,y]; Points := [[1/2, 2], [3/4, 4], [5, 6/11], [-1/2, -2]]; Values := [1/2,1/3,1/5,-1/2]; F := Interpolate(Points, Values); F; -46849/834000y^2 - 1547/52125x + 13418/52125y + 46849/208500 ------------------------------- [Eval(F, P) | P In Points] = Values; -- check TRUE ------------------------------- |