How do I make matlab estimate the best function to descibe different lines in a graph?
3 次查看(过去 30 天)
显示 更早的评论
Hi
I have been asked to make a program that can replace this piece of papir, as illustrated in the image.
This image is an graphic illustration of a function that can take the x and y coordinates and give you a percentage.
Since the graph is from 1962 I haven't been able to find the function for it, so I was thinking is there a smart way to make matlab estimate the function that best fits the lines. So when I chose x = 20 and y = 10, it gives me the result of 70. Another example is I chose x = 20 and y = 20, and it gives me the result of 60, as you can measure on the image.
0 个评论
回答(1 个)
Star Strider
2017-9-13
There may not be a function for those plots, since they could have been derived from experimental data. Probably the best you can do is to manually digitise it, then use an interpolation function such as interp2 (link) to estimate the percent value.
2 个评论
Star Strider
2017-9-13
I would extend that idea, choosing perhaps 9 vertical grid points from -5 to 40 (visually extrapolating for 95% and 100%), and (conveniently) 9 horizontal grid points from 0 to 80. Then use interp2 to do the interpolation. That is the only way I can think of to do it. The ‘Z’ coordinate would be the percent value.
Getting a function approximation (identifying the parameters of a function describing the process that created those data) is likely not possible, since you do not already have that function or one describing a similar process.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!