1 | initial version |
You can use find_fit
to fit an exponential function to this data. (You could also fit a line but it is not a very good fit.) Here is an example:
var('a b c')
model(x) = a*exp(b*x)
data=[[i,lizardsquad(i)[0]] for i in range(25) ]
fit=find_fit(data,model,solution_dict=True)
print fit[a],fit[b]
point(data)+plot(fit[a]*exp(fit[b]*x),(x,0,25))