ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 05 Jul 2013 04:24:14 +0200Model of polynomial with integer coefficientshttps://ask.sagemath.org/question/10321/model-of-polynomial-with-integer-coefficients/Can Sage find fit to the data in form of the polynomial with integer coefficients? I mean that I want to find polyinomial with integer coefficients which will approximate my date by the best way, that is the distance from points in "mydata" to graph of the polyinomial will be the least.
Now I have:
...
mydata = [[A[i],B[i]] for i in range(0,len(A))]
var('a,b,c,x,t')
def intPol(a,b,c,x):
f=a*x^2 + b*x + c
return f
myfit = find_fit(mydata,intPol,parameters = [a, b, c], variables = [x],solution_dict=True)
Is there any way to approximate my data by same polynomial without models?
Sorry for my English(bakantFri, 05 Jul 2013 04:24:14 +0200https://ask.sagemath.org/question/10321/