Question: Fit a Graph with 3 points

I'm wondering why the fit routine gives weird results, when telling him to fit

with(Statistics):

X:=Vector[column](3, {1 = 616.3096, 2 = 616.3248, 3 = 616.3342}, datatype = sfloat, storage = rectangular, order = Fortran_order, shape = []);

Y:=Vector[column](3, {1 = 99590., 2 = 127564., 3 = 144223.}, datatype = sfloat, storage = rectangular, order = Fortran_order, shape = []);

g:=Fit(a+b*x+c*x^2,X,Y,x)

It's telling me: Warning, model is not of full rank

If I calculate the coefficients the direct way (well the fit should be exact,because we only have 3 values and 3 parameters) I get:

M:=Matrix(3, 3, {(1, 1) = 1, (1, 2) = 616.3096, (1, 3) = 379837.52305216, (2, 1) = 1, (2, 2) = 616.3248, (2, 3) = 379856.25909504, (3, 1) = 1, (3, 2) = 616.3342, (3, 3) = 379867.84608964}, datatype = anything, storage = rectangular, order = Fortran_order, shape = []);
V:=Vector[column](3, {1 = 99590, 2 = 127564, 3 = 144223}, datatype = anything, storage = rectangular, order = Fortran_order, shape = []);
with(LinearAlgebra):
C:=MatrixVectorMultiply(M^-1,V)

 

Please Wait...