Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Feedback for the second stimulus does not show up on screen

1 visualización (últimos 30 días)
xxxx1017
xxxx1017 el 18 de Mzo. de 2019
Cerrada: Stephan el 18 de Mzo. de 2019
Hi guys,
I'm currently doing research in the Simon task and in this study, I'm planning to collect two responses for both the first and second stimuli. However, when I'm trying to test it using Psychtoolbox, the feedback for the second stimulus response does not show up as expected even if the code is similar to the code for the first task feedback. During the testing, the S2 appears on screen until the presentation limit for the S2 even if I have pressed a key.
Could anybody check where is the problem?
%this is the script for the first stimulus
if RespKey1 == -1
textmessage = 'Please press the homekey!';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
elseif RespKey1 == OneTrtyInfo.R1 & RT1 < Tar1_limit & RT1 > MinRT1
textmessage = 'Correct';
disp(textmessage)
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC1 = 1;
ErrorCode = 0;
elseif RespKey1 ~= OneTrtyInfo.R1
textmessage =['Error: The correct response was ' R1 ];
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC1 = 0;
PC2 = 0;
ErrorCode = ErrorCode + 1;
elseif RT1 > Tar1_limit
textmessage = 'Your response was too slow! Please respond faster.';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC1 = 0;
PC2 = 0;
ErrorCode = ErrorCode +1;
elseif RT1 < MinRT1
textmessage = 'Too FAST! Do not respond before the color is presented.';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC1 = 0;
PC2 = 0;
ErrorCode = ErrorCode +1;
end
%this is the script for the second stimulus
if RespKey2 == -1
textmessage = 'Please press the homekey!';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
elseif RespKey2 == OneTrtyInfo.R2 & RT2 < MaxRT2 & RT2 > MinRT2
textmessage = 'Correct';
disp(textmessage)
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC2 = 1;
ErrorCode = 0;
elseif RespKey2 ~= OneTrtyInfo.R2
textmessage =['Error: The correct response was ' R2 ];
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC2 = 0;
ErrorCode = ErrorCode +1;
elseif RT2 > MaxRT2
textmessage = 'Your response was too slow! Please respond faster.';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC2 = 0;
ErrorCode = ErrorCode +1;
elseif RT2 < MinRT2
textmessage = 'Too FAST! Do not respond before the color is presented.';
Screen('FillRect', ScreenInfo.MyHandle, ScreenInfo.black);
DrawFormattedText(ScreenInfo.MyHandle,textmessage, 'center', 'center', ScreenInfo.white);
Screen('Flip', ScreenInfo.MyHandle);
PC2 = 0;
ErrorCode = ErrorCode +1;
end

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by