1. Not finding help here? Sign up for a free 30min 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!

Help finding a polynomial function given a set of data

  1. Mar 25, 2016 #1
    1. The problem statement, all variables and given/known data
    Hello guys, I have a set of data containing x and y coordinates(width and length) as well as a 'z' coordinate that represents power density at each point of x and y given. I was hoping that someone might be able to help me figure out a way that I can find a function for z in terms of x and y given all of the data points. Perhaps matlab or mathematica has a way of doing it, although I have not found it yet. I will include a snapshot of some of the data although it is extensive. Also, the number of width data points are larger than the number of length data points if that makes a difference. Thank you very much

    2. Relevant equations
    Polynomial function for z in terms of x and y given the data



    3. The attempt at a solution
    Looked around the web for quite some time on how to figure this out without brute force and couldn't find any solid answers.
     

    Attached Files:

  2. jcsd
  3. Mar 25, 2016 #2

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You have 72 data points. It's trivial to fit a 72-degree polynomial to that, but that's very unlikely to be realistic, and may behave badly in interpolation and extrapolation.

    What is usually done is to use one's a priori expectations of the relationships between x, y and z to create a model, which is an equation that gives z in terms of y and z, together with a number of unknown parameters, in a way that has some intuitive basis in the underlying physical phenomena. Having guessed a model, the data can then be used to estimate the parameters based on an approach of minimising residuals.
    The polynomial approach has 72 unknown parameters, which leads to a grossly overfitted curve. Typically, one would only want a few parameters to estimate - say two to six.

    What is the physical context? That should suggest a promising model.
     
  4. Mar 25, 2016 #3

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    Congratulations! I have never seen such precise experimental data. :oldbiggrin:

    If you drew the graph of the points, but don't trouble to be more than two-place accurate, you and we might have an idea what degree of polynomial it would make sense to try and fit them to.
     
  5. Mar 25, 2016 #4

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I wouldn't think you would want a polynomial fit. Not particularly my field, but I would suggest you look at bivariate splines. The quadratic Shepard's method is one that comes to mind. Lots of info on the internet. Look up QSHEP2D.
     
  6. Apr 15, 2016 #5
    Hey guys, I apologize for taking so long to respond and I really appreciate your responses. There are actually many many more data points than in the sample that I posted. I ended up being able to export the data from excel and interpolate/apply it to my model in third party software. Thanks again for your help!
     
  7. Apr 15, 2016 #6

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    Could you show us any result?
     
  8. Apr 15, 2016 #7
    Let me get back to you on that! Feel free to remind me or pm if I forget.
     
  9. Apr 15, 2016 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    As said by "epenguin", you are to be congratulated for the accuracy of the experimental data. Your length and width measurements are accurate to within a small fraction of the diameter of a hydrogen atom. What sort of measuring device did you use?
     
  10. Apr 16, 2016 #9
    Thank you, the results are however not mine; I am using the data to help model something.
     
  11. Apr 16, 2016 #10
    I guess you cannot send a pm on these forums.
     
  12. Apr 16, 2016 #11

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You can, but they're called Conversations here rather than PM.
    To do one, hover your mouse over INBOX on the top menu. In the pop-up menu that appears, a 'Start a New Conversation' link is in the bottom right corner.
     
  13. Apr 16, 2016 #12
    Ahh okay, thank you very much.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Help finding a polynomial function given a set of data
Loading...