필터 지우기
필터 지우기

how to see x and y cordinate in the plot beyond its end point?

조회 수: 2 (최근 30일)
satish thapaliya
satish thapaliya 2012년 11월 21일
I have a matlab plot containing value of x from 5 to 25. I want to find the y value corresponding to 3 at x axis but I can't use data cursor to indicate that point. What option can help me with it?

답변 (2개)

Harshit
Harshit 2012년 11월 21일
HI Satish, If you dont have any information about the values beyond 5 and 25 then you have to extrapolate. Well the type of extrapolation depends on your plot. If it is a line linear extrapolation will work. Otherwise get the correct type of extrapolation.
  댓글 수: 2
satish thapaliya
satish thapaliya 2012년 11월 21일
How does it work? could you make a bit clearer with some examples?
Harshit
Harshit 2012년 11월 21일
Well one idea is to use polyfit to get curve corresponding to it. Only thing is to get the parameter of this function. Then evaluate x(3) on this polynomial. Jan's answer is one more approach.

댓글을 달려면 로그인하십시오.


Jan
Jan 2012년 11월 21일
You have y-values for the x-values 5 to 25. Now you want the y-value for x==3. Obviously this is not possible directly. There is no such corresponding value.
If the values are predictable, you can "extrapolate". Example: If all points build a line, you can expect, that the value of x==3 is on this line also. See "help interp1" with the "extrap" flag. But if the values are more random or follow a high order polynomial, a prediction of a value outside the defined interval is more or less guessing.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by