How do I break from a loop on keyboard input without plugins?
Ältere Kommentare anzeigen
I have been trying to figure out for a while how to accomplish the following, but I don't want to use plugins. This is because the Psychtoolbox stopped working, and I don't want to fix it:
while 1
% perform task
% poll keyboard, do not stop, just check if a button is pressed
if button is pressed
break;
end
end
The faster the polling happens, the better.
1 Kommentar
Josh
am 9 Mai 2024
did you find a solution?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Timing and presenting 2D and 3D stimuli finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!