필터 지우기
필터 지우기

Wait For Key Press?

조회 수: 3 (최근 30일)
Tim Mottram
Tim Mottram 2012년 12월 11일
Hi Guys, I'm having a problem where I want to view consecutive 3d scatter plots. I plot the first one, then, when I'm ready I press a mouse button and it advances to the next plot using:
waitforbuttonpress
to advance the code . This is working fine. But in addition to this I also want to rotate the image, however using the mouse to rotate the image makes the program advance to the next plot! What I really would like is a
waitforKEYpress,
so I can use the mouse on the plot and when I'm done press a key to advance. So my question is:
Are there any other
"waitfor"'s
which will let me use the mouse on plots freely?
Many Thanks in Advance,
Tim.

답변 (2개)

Walter Roberson
Walter Roberson 2012년 12월 11일
Use a figure WindowKeypressFcn callback.
  댓글 수: 2
Tim Mottram
Tim Mottram 2012년 12월 12일
Hi Walter, thanks for you reply. Will this method work without a GUI, as I'm not using one..
Walter Roberson
Walter Roberson 2012년 12월 12일
A scatter plot has to be in an axes, which has to be part of a figure. Attach the callback to that figure.
As far as MATLAB is concerned, "GUI" and "figure" are the same thing.

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


Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 12일
편집: Muruganandham Subramanian 2012년 12월 12일
Otherwise, you can use keyboard, dbquit command also..

카테고리

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