1
$\begingroup$

my aim is to fit data points by the use of Legendre Polynomials. Has anybody experience with this task? My final aim is to do this automatically with mathematica.

Thanks, rainer

  • 3
    "My final aim is to do this automatically with mathematica" - Look up `Fit[]`2012-08-20

1 Answers 1

1

Is it enough to use to Legendre Polynomials as basis within the Fit[] Function. Fit[data,{LegendreP[1,x],LegendreP[2,x],LegendreP[3,x]},x] I would be glad about an explanation how it actually works. Thx rainer

  • 1
    You've forgotten the constant term: `Fit[data, {1, LegendreP[1, x], LegendreP[2, x], LegendreP[3, x]}, x]`2012-08-21
  • 0
    The problem is for an arbitrary set of data points this produces exactely the same solution as: Fit[data, {1,x,x^2,x^3}, x]. So I do not understand what the special thing about Legendre Approximation is.2012-08-21