Question: How do I set a Polynomial Interpolation for the my dataset

I tried pairs of x and y:

> with(CurveFitting);


> points:=[[2.612499,16.24096]],[3.437499,14.21687],[3.437499,11.22891],[3.437499,8.192769],[4.262499,6.361444],[5.224999,7.662649]];

> h := PolynomialInterpolation(points, x);

I got

Error, (in CurveFitting:-PolynomialInterpolation) data points not in recognizable format

I also tried

> points := [0, 1], [1, 2], [3, -7], [4, -3];
               

points:= [0, 1], [1, 2], [3, -7], [4, -3]

i := PolynomialInterpolation(points, x)

I got

Error, (in CurveFitting:-PolynomialInterpolation) 3rd argument must have type name or numeric.

Thanks for your help

Please Wait...