Help finding a polynomial function given a set of data

  • Thread starter saybrook1
  • Start date
  • #1
101
4

Homework Statement


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

Homework Equations


Polynomial function for z in terms of x and y given the data[/B]


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.
 

Attachments

  • fit to z.png
    fit to z.png
    60.4 KB · Views: 322

Answers and Replies

  • #2
andrewkirk
Science Advisor
Homework Helper
Insights Author
Gold Member
3,938
1,501
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.
 
  • #3
epenguin
Homework Helper
Gold Member
3,878
902
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.
 
  • #4
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
773
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.
 
  • #5
101
4
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!
 
  • #6
epenguin
Homework Helper
Gold Member
3,878
902
Could you show us any result?
 
  • #7
101
4
Could you show us any result?
Let me get back to you on that! Feel free to remind me or pm if I forget.
 
  • #8
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,722
Let me get back to you on that! Feel free to remind me or pm if I forget.

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?
 
  • #9
101
4
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?
Thank you, the results are however not mine; I am using the data to help model something.
 
  • #10
101
4
I guess you cannot send a pm on these forums.
 
  • #11
andrewkirk
Science Advisor
Homework Helper
Insights Author
Gold Member
3,938
1,501
I guess you cannot send a pm on these forums.
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.
 
  • #12
101
4
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.
Ahh okay, thank you very much.
 

Related Threads on Help finding a polynomial function given a set of data

  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
5
Views
1K
Replies
3
Views
534
Replies
3
Views
3K
Replies
2
Views
830
Replies
1
Views
1K
Replies
0
Views
796
  • Last Post
Replies
16
Views
3K
  • Last Post
Replies
1
Views
1K
Top