Filter löschen
Filter löschen

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

4 Ansichten (letzte 30 Tage)
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.

Antworten (1)

Star Strider
Star Strider am 13 Sep. 2017
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 Kommentare
Mikkel Ibsen
Mikkel Ibsen am 13 Sep. 2017
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 am 13 Sep. 2017
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by