Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
3  
"My final aim is to do this automatically with mathematica" - Look up Fit[] –  J. M. Aug 20 '12 at 8:00

1 Answer 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

share|improve this answer
1  
You've forgotten the constant term: Fit[data, {1, LegendreP[1, x], LegendreP[2, x], LegendreP[3, x]}, x] –  J. M. Aug 21 '12 at 0:51
    
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. –  rainer Aug 21 '12 at 5:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.