Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Accurately fitting curve to data

  1. Nov 28, 2008 #1
    Hi everyone,
    I want to find a function to fit a two arrays data (X,Y=f(X)) with high precision, but I am not succeed.
    Can any one help me.
    These are my data:

    Thanks a lot in advance
  2. jcsd
  3. Nov 30, 2008 #2
    Be a little more precise...what is your exact definition of accuracy? I see that you have 103 data points, so you could come up with a 102nd degree polynomial that goes through every one of those points exactly using polynomial interpolation and Vandermonde matrices. All this would take is a bit of time for you to enter your data into a linear algebra program such as Matlab or Octave.

    On the other hand, if you want the best linear approximation of that function you could consider linear least squares or higher-order least squares approximations.

    It all depends on your definition of "accurate" and what kind of curve you want to fit.
  4. Dec 1, 2008 #3
    Given that the X is simply a count, I presume this is a time series. It might be interesting to read/google about autoregression models or ARIMA models.
  5. Dec 1, 2008 #4
    If you have access to a spreadsheet program such as excel, they contain functions for this purpose. You would have to try them to test for the degree of precision.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Accurately fitting curve to data
  1. Curve fitting (Replies: 0)