for loop forward and backward
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rightia Rollmann
am 12 Jan. 2017
Bearbeitet: Luke M
am 12 Jan. 2017
How to make the loop below count increasingly (1,2,3,…) when I press the mouse button and count decreasingly (4,3,2,…) when if press a keyboard button?
for i = 1:10
disp( num2str( i ) );
w = waitforbuttonpress;
end
2 Kommentare
John Chilleri
am 12 Jan. 2017
This can be done with buttons created in a GUI, would that be adequate?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!