MATLAB: Get the x-value of a point on curve

interpolationplot

I draw a curve between two vector of points, not a function, how can I get the x-value of a certain y-value of the curve?

Best Answer

When you say "get", do you mean from the vectors, or only from the curve?
If you mean from the data, you can do, for example
x(y==0.25)
(You might need to be careful if y is not exactly 0.25, due to floating point precision.)