Generating an Equation out of a Table
16 views (last 30 days)
I have a table with measured values. The values are dependend on two parameter (x and y axis).
I plotted the values in a 3D plot
Now I would like to generate an equation/function to calculate every individuel point. The function should have only two variables (value from x and y axis).
Is there a way to generate such a function with MATLAB?
Walter Roberson on 17 Mar 2021
Yes, there is a way to generate such a function. We can prove mathematically that Lagrange Interpolation on any finite set of points of finite precision can be used to construct a multinomial that will exactly pass through each given data (to within round-off error.)
It looks to me as if the data represented in that image would probably take a multinomial of roughly total degree 350 to fit.
You would expect that the corresponding surface would be quite rough in-between each of the given points -- not even remotely close to the smooth surface you see in your image. You can also be sure that the function would go off to infinity just slightly outside the data that has been given.
The generated multinomial will be of no human use what-so-ever, except as a minor curiosity. It will have absolutely no physical relevance.
There is a huge difference between having an equation that can calculate each given point compared to having a useful equation. Mathematically, there are an infinite number of different equations that fit all of the given points perfectly. And that is a problem: since there are literally an infinite number of them, then the probability that any one of them is the "right" equation is ZERO.
You cannot construct an equation from data that you have no mathematical model for. Or rather, you can but it is not going to have any physical relevance. And that's the best case -- the case where there was no experimental error.