Returning which button was pressed.
Afficher commentaires plus anciens
Hi guys, I have been looking for a while but cant seem to find an answer. If i use something like:
waitforbutttonpress
can I return the button which was pressed? for example:
button = waitforbuttonpress
if button == rightMouse
methodOne
elseif button == leftMouse
methodTwo
else
break
end
1 commentaire
Sergey Lopatnikov
le 19 Fév 2017
It will not work. You cannot exit from loop this way. You only can start loop as one of the methods, However, if you start loop[ you will not be able to stop evaluation by mouse click because decision is outside the loop.
Réponse acceptée
Plus de réponses (1)
Sachin Ganjare
le 26 Oct 2012
0 votes
Refer below link:
Hope it helps!!!
1 commentaire
Tim Mottram
le 26 Oct 2012
Catégories
En savoir plus sur Desktop dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!