필터 지우기
필터 지우기

ButtonDownFcn / need some explanation

조회 수: 1 (최근 30일)
Max Müller
Max Müller 2014년 7월 18일
답변: Image Analyst 2014년 7월 18일
Hey Guys,
I ve read a lot of stuff for the last 2 hours but I still dont know how to use the Function. The Problem: My GUI reads Data and plots it in a new figure as subplot.(Figurename = Plot) Now I want to create a Push button, which uses somehow the ButtonDownFcn to give me the coordinates of where I clicked...... Qestions: How does the ButtonDownFcn work ? Is there a another alternative ? Can i Activate the datacursormode for my Plot-figure ?
Thanks
  댓글 수: 1
Joakim Magnusson
Joakim Magnusson 2014년 7월 18일
편집: Joakim Magnusson 2014년 7월 18일
Do you want the coordinates of where you clicked at the pushbutton? Or where you click inside the plot? It's hard to understand exactly what you want to do.
If you just want to know how ButtonDownFcn works it's explained quite well in the documentation.

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

채택된 답변

Image Analyst
Image Analyst 2014년 7월 18일
Why not have a push button where in the callback function, you call
uiwait(helpdlg('Click in the plot'));
[x, y] = ginput(1);
Your user clicks in the plot and ginput() returns the x and y of where they clicked.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by