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

Curve fitting in Matlab

  1. Jun 16, 2008 #1

    I've just been trying unsuccessfully to fit a polynomial to a large set of data in Matlab (1301 points). I want to fit a polynomial to the data so that I have a function with which to try and manipulate the data in different ways.

    I have no problem fitting polynomials to much smaller sets of data. I know that other curve fitting options exist, such as the moving average. However, it is my understanding that they do not return a function which can be used (so it seems it is just for presentation).

    Has anyone had any experience with this?

    Thanks, :confused:

  2. jcsd
  3. Jun 17, 2008 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    Do a search on the Mathworks web site, there is a bunch of code that can be looked at to help you along. Look in your numerical analysis text for Lagrange polynomials or spline curve fits.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Curve fitting in Matlab
  1. Curve fit in MATLAB (Replies: 5)