Increment variable as function of time a button is held down
조회 수: 8 (최근 30일)
이전 댓글 표시
Is there a way to somehow capture the amount of time that a button is held down, and use it to update, in real time, a variable? my specific interest is in using a button to spin a 3d figure. I can get it to do so, but only in increments (click,*spin n rads*,click,*spin n rads* etc).
I have looked for something like this and have been unable to find an answer.
thanks, Alex
댓글 수: 0
채택된 답변
Jan
2012년 4월 27일
You can use the 'WindowsButtonUpFcn' of the figure to catch the release of the button.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!