필터 지우기
필터 지우기

How can i create movable handles in Matlab graph to find data at the intersection of the handle and the graph?

조회 수: 7 (최근 30일)
I have a data and after plotting the data I want to develope a program to find out the result value in the graph by providing a vertical movable line which the user can drag thoughout the graph to fing value at desireable frequency. I already know about the datatip feature but this question is based on the future developments of the program.

답변 (1개)

Joe Vinciguerra
Joe Vinciguerra 2023년 4월 4일
If it fits your appication you could use stackedplot():
X = 0:0.1:4*pi();
Y = sin(X);
stackedplot(X',Y', "DisplayLabels", "sin(x)");
The vertical line follows the cursor.
  댓글 수: 1
Ron
Ron 2023년 4월 4일
Thank you so much @Joe Vinciguerra for this amazing reply. i nevee knew about this feature. But i guess this is not what i want maybe i did not phrased my problem correctly. So i want these vertical lines which can be moved from one region to another like you can pick the line and then drop/slide it at another locaion and then the line should display the output value. My real probelm is that I have to find the average of result values of given regions of graph but with different materilals the region keeps on changing and hence i want a customizable drag and drop kind of setup so that i can choose area of my choice and get the data in real time.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by