Extraction of values from a graph.
조회 수: 5(최근 30일)
표시 이전 댓글
I have drawn a graph witha a few known values. I need the values of the intermediate x-values. The code is as below.
T=20:20:300;
rho=[1000 995 985 974 961 945 928 909 889 867 842 815 786 752 714];
plot(T,rho)
From the above plotted graph I need values of T which are not defined.
If there is any other method through which I can extract values(Not necessarily from the graph like linear interpolation), please do tell.
Thank You.
댓글 수: 0
채택된 답변
J. Alex Lee
2019년 12월 25일
There is a function called "interp1", which seems like it will suit your need. You have options on interpolation method.
T=20:20:300;
rho=[1000 995 985 974 961 945 928 909 889 867 842 815 786 752 714];
plot(T,rho,'.-')
% T values of interest
Ti = [25 56 88 204 288]
rhoi = interp1(T,rho,Ti)
hold on;
plot(Ti,rhoi,'*r')
추가 답변(0개)
참고 항목
범주
Find more on Directed Graphs in Help Center and File Exchange
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!