find a point on a graph
4 views (last 30 days)
John D'Errico on 10 Mar 2021
You COULD approximate the curve with some function. Best to choose one that can be intelligently extrapolate. Then since you need ot find a value of x where y == 1000, you would either invert the function, perhaps using an analytical inverse if one exists, or using fzero.
Or, since this is fairly well behaved looking curve, you could approximate the data in that plot using a model of the form x(y). Now all you need do is evaluate the functino at y==1000.
We don't have your data, nor any clue as to what a reasonable model might be for all of this. So go and do one of the above.
Star Strider on 10 Mar 2021
Try somethiing like this with your data:
x = 10:50; % Create Data
y = 4000 - 80*x; % Create Data
x1k = interp1(y, x, 1000); % Interpolate
plot(x, y, x1k, 1000, 'rs') % Plot Result
Use interp1 to find the x-value for the y-value at 1000.