What functions are best for approximating the Least Square Method?

  • Level: Undergrad 
  • Thread starter aldrinkleys
  • Start date
  • Tags Tags
    Method Square
2 replies · 3K views · last reply
aldrinkleys
Messages
15
Reaction score
0
Mathematica ListPlot of discrete data points: values start near 1.25 at x near 5, drop to about -0.6 near x 60, then level off around -0.45 from x 75 to 175, with a horizontal axis line at zero.


Which families of functions should I use to approximate it?

I tried f(x) = a + bx + cx^2 + dx^3 + ex^4 + fx^5 + gx^6

a,b,c,d,e,f,g [tex]\in[/tex] R

And I got this:

Mathematica session: FindFit fits a sixth-degree polynomial a + bx + cx^3 + dx^4 + ex^5 + fx^6 to data, with the fitted curve plotted over scattered points from x = 0 to 180, dipping below zero near x = 50 and leveling off around -0.5.


but that curve ignores the hole between 50 and 80.
and this is important for me and f(x) is too long...



Can anyone help me?
 
That fit is probably optimal if you want to fit all the data at the same time. You could break the data into two fits for better accuracy, however.
 
ah, I solved my problem =)I used Harmonic analysis

Scatter plot of blue data points with a smooth fitted curve, Cp on the vertical axis against θ (°) on the horizontal axis from 0 to about 180. Cp starts near 1.2, falls steeply to a minimum near -0.6 around 60°, then levels off near -0.4 to -0.5.