Curve Fitting

Manipulate[
Plot[Evaluate[Fit[points,Table[x^i,{i,0,m}],x]],{x,0,1},ImageSize->{500,400},Frame->True,Axes->False,PlotRange->{{0,1},{-2,2}},PlotLabel->Fit[points,Table[x^i,{i,0,m}],x]],
{{m,4,"polynomial degree"},1,6,1,Appearance->"Labeled"},
{{points,RandomReal[{0,1},{5,2}]},{0,-2},{1,2},Locator,LocatorAutoCreate->True}]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Curve Fitting" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/CurveFitting/

Contributed by: Theodore Gray

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »