How to read the data from a fitted graph at specific points?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
R7 DR
am 18 Mär. 2015
Kommentiert: Star Strider
am 23 Mär. 2015
Hi
I have a graph like the attached image. How to read the data from a graph at specific points.
For example, at the values on Y-axis 0.1, 0.3, 0.5 and 0.8 then what are the corresponding values in the X-axis?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148074/image.png)
Thanks
0 Kommentare
Akzeptierte Antwort
Star Strider
am 23 Mär. 2015
I don’t know what function you used to fit your data, but I would generate the fit (or use only the data) for a range of x between about 250 and 500, and then use interp1 but with the arguments reversed from the usual:
yq = [0.1, 0.3, 0.5, 0.8]; % Y Query Points
xq = interp1(ydata, xdata, yq); % Interpolated X Values
The reason for restricting the data to that range is due to the interp1 requirement that the data be monotonically increasing (in ‘ydata’ here), and it is not over the entire range. So you must restrict it to that range of x if you want it to work with interp1.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!