Question: Can we get an exact curve fitting line?

May 19 2011 Christopher2222 3879
5

If for example

L := [3, 4, 6, 7, 2, 3, 5, 4, 6, 8, 20, 4, 5, 12, 0, 5, 5, 5, 3]:

b := ListTools:-Enumerate(L):
g := plot(CurveFitting:-Spline(b, v), v = 1 .. 19):
gp:=pointplot(b):

display(g,gp)

It is a nice curve but between points at x=12 and x=13 there exists a large dip, and there are a few other smaller ones.  But of course Spline uses a piecwise polynomial so I understand the overshoots but can we not fit an even better curved line?  So that point 12 is a point of concavity?  If we can how do we do it?

Please Wait...