get the x-value of a point on curve
18 views (last 30 days)
the cyclist on 20 Feb 2020
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
(You might need to be careful if y is not exactly 0.25, due to floating point precision.)
More Answers (1)
Sky Sartorius on 20 Feb 2020
This is a table lookup / interpolation problem. For your data, you'll first have to make sure there aren't any repeated y values.
yQuery = -2.6e8; % Example query point.
[Y,ind] = unique(y,'stable')
X = x(ind);
x = interp1(Y,X,yQuery)