1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Creating a formula from plot points

  1. Oct 26, 2013 #1
    Hallo all...

    I have a couple of plot values that I am trying to derive a formula from. The points are almost linear but not quite...

    Was hoping someone could shed some light on how to go about this...
    I have Matlab 7.1, would like to use it if at all possible....

    Any help would be appreciated.
  2. jcsd
  3. Oct 26, 2013 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    Welcome to PF;
    Turning a plot into an equation is called regression analysis.
    You have to start out with a good idea of what the underlying equation should be before you start.

    If you only have two points, then you can only plot a line - I'm guessing you mean you have a couple of datasets that, when you graph them, make something that looks like it's trying to be a line.

    The matlab function you want will be: polyfit
    ... you want to find the line y=mx+c that best fits the data.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook