How to find a y value for a given x in a plot?
조회 수: 12 (최근 30일)
이전 댓글 표시
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!