psychtoolbox 및 정확한 타이밍에 문제가 있습니다. 필자는 웹 사이트의 튜토리얼과 PsychDocumentation의 PTBTutorial-ECVP2013.pdf에 따라 코드를 작성했습니다. 그러나 그것은 어떻게 든 여전히 올바르게 작동하지 않습니다. 뒤집기 (1 초 또는 2 초)보다 오래 걸립니다 (20 초 이상). 그래서 저는 어딘가에서 중요한 실수를 저지르고 있다고 생각합니다. 그러나 그것을 찾을 수는 없습니다. 제 코드를 도와 주시겠습니까?psychtoolbox 정확한 타이밍이 설정 프레임에서 뒤집히지 않습니다.
어쨌든 내 코드는 다음과 같습니다.
%Number of seconds to wait (ns)
nsS = 2; %sentences
nsW = 1; %words
nsDot = 7;
nsWait= 3;
%Number of frames to wait (wf) before flipping
wfS = round(nsS/ifi);
wfW = round(nsW/ifi);
wfDot = round(nsDot/ifi);
wfWait = round(nsWait/ifi);
vbl=Screen('Flip', window);
for i = 1:10 %1:exp.ntrials
sentence = ...; %load sentences
word = ...% load words;
for iframe = 1:300
%draw fixation cross
if iframe <= 60
DrawFormattedText(window, '+','center','center', white);
vbl =Screen('Flip', window, vbl + (wfW-0.5)*ifi);
%draw sentence
elseif iframe <= 180
DrawFormattedText(window, sentence,'center','center', white);
vbl = Screen('Flip', window, vbl + (wfS-0.5)*ifi);
%blank screen
elseif iframe <= 240
Screen('FillRect', window, black);
vbl = Screen('Flip', window, vbl + (wfW-0.5)*ifi);
%Draw word
elseif iframe <=300
DrawFormattedText(window, word,'center','center', white);
vbl = Screen('Flip', window,vbl + (wfW-0.5)*ifi);
end
end
%Draw dot
for frames = 1:wfDot
Screen('DrawDots', window, [xCenter yCenter], 10, white, [], 2);
vbl=Screen('Flip', window, vbl+(wfDot-0.5)*ifi);%, vbl+(wfDot-0.5)*ifi);
%WaitSecs(7);
end
...
end