How to find the x and y values of a graph which is covered by a certain range?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two sets of data for two curves. The first set is
x_Exp = [1.1;1.083;1.08;1.073;1.015;0.993;0.987;0.978;0.974;0.946;0.941;0.897];
y_Exp = [5.504201829;5.639866885;5.610055654;5.789536433;5.694270035;5.525332713;5.634467851;5.540490674;5.585972432;5.111549463;5.129729547;4.542420443];
The second set is
x_Model = [1.11111;1.05263;1;0.952381;0.909091;0.869565];
y_Model = [5.317717952;5.632039396;5.896917576;5.622196354;5.107126594;4.5305684];
I want to find the values of "x_Model" which are within the range of "x_Exp".
Here in my example in "x_Model" this two values '1.11111' and '0.869565' are not in the range of x_Exp (Between 1.1 to 0.897).
here my desired result is
x_Model = [1.05263;1;0.952381;0.909091];
y_Model = [5.632039396;5.896917576;5.622196354;5.107126594];
How can i find this? I also need the corresponding "y_Model value"
댓글 수: 0
채택된 답변
Star Strider
2018년 11월 8일
Try this:
x_Model_Mask = (x_Model >= min(x_Exp)) & (x_Model <= max(x_Exp)); % Logical Vector
x_Model_Result = x_Model(x_Model_Mask)
y_Model_Result = y_Model(x_Model_Mask)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!