フィルターのクリア

Capture reaction time - code not working

1 回表示 (過去 30 日間)
Chelsea
Chelsea 2015 年 3 月 3 日
Hi,
I'm trying to capture simple reaction time, but the code I have isn't working (i.e., gives me RT of 0.00000008, etc.).
Here is what I have...
secs0=GetSecs; % Wait for a keyboard response
respToBeMade = true;
while respToBeMade
[keyIsDown,secs, pressedKeys] = KbCheck;
if pressedKeys(escapeKey);
ShowCursor;
sca;
return;
elseif pressedKeys(upKey);
keyResp = 's';
respToBeMade = false;
elseif pressedKeys(downKey);
keyResp = 'l';
respToBeMade = false;
end
end
RT=secs-secs0; % Get reaction time
Is there something that is clearly wrong here? I can't seem to figure it out, it looks right to me. I'm also using Psychtoolbox if that makes a difference.
Thank you!

回答 (0 件)

カテゴリ

Help Center および File ExchangeTiming and presenting 2D and 3D stimuli についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by