How do I break from a loop on keyboard input without plugins?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Salah Ad-Din Ahmed
el 4 de Mayo de 2024
Comentada: Josh
el 10 de Mayo de 2024
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.
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Timing and presenting 2D and 3D stimuli en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!