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!