Capture reaction time to specific button press
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I would like to measure how long it takes a user to press key 1 after display of an instruction key. I've tried using tic toc but from manually checking elapsed time, I know that the variable 'reaction' is not capturing the data correctly. Are there any other ways I could do this other than tic toc? Thanks
one=KbName('1!');
Screen('DrawText',win,'Please press 1',100,100)
Screen('Flip',win)
tic;
while KbEventAvail;
[evt,n]=KbEventGet();
if evt.Keycode==one & evt.Pressed==1;
reaction=toc;
end
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Timing and presenting 2D and 3D stimuli finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!