How to find a y value for a given x in a plot?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anirban Mandal
el 30 de Nov. de 2021
Comentada: Anirban Mandal
el 1 de Dic. de 2021
I have plotted a curve with a given dataset. Now I want to find the value of y for a certain value of x. The code and graph is give below.
filen='argo-profiles-2902294.nc'
p=ncread(filen,'PRES');
t=ncread(filen,'TEMP');
p1=p(:,2)
t1=t(:,2)
plot(t1,p1,'k')
set(gca,'YDir','reverse')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/818659/image.jpeg)
Now, let's say I want to find the pressure value for a certain x value (say 25). What to do?
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Graphics Object Identification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!