How do I make matlab estimate the best function to descibe different lines in a graph?

조회 수: 4 (최근 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.

답변 (1개)

Star Strider
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
Mikkel Ibsen
Mikkel Ibsen 2017년 9월 13일
Maybe it cant be done, but I was thinking that I choose a Y-Value like for example 10:
Then I collect all the points where I cross a line and see what percentage value the line has and what X-value it has. So in this example i would get something like.
Y = 10 [6, 40%] [7,5 45%] [9, 50%] [11, 55%] and so on...
I don't know how I would get to a function but it was just an idea?
Star Strider
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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by