I want to add time limit to the response time. I have a code for "wait for response", but I don't know where and what code I should add. (I refered several codes but didn't work) I'm using Psychtoolbox,
%Wait for response
while keyOn == 0 [keyIsDown,secs,keycode] = KbCheck; if keycode(spaceKey) || keycode(num1Key) || keycode(num2Key) || keycode(num3Key) ... || keycode(num4Key) || keycode(num5Key) || keycode(num6Key) ... || keycode(num7Key) || keycode(num8Key) || keycode(num9Key) keyOn = 1; end end
Thank you!
Best Answer