私は MATLAB で psychtoolbox を使用しています。参加者に一連の画像の歪みを 0 ~ 9 で評価してもらいたいと考えています。GetChar を使用してみましたが、スクリプトを実行すると、ユーザーの応答を待たずに次の画面に移動します。これを修正する方法について何かアドバイスはありますか?
%using a loop to show images
for k=1:290
texture1(k)=Screen('MakeTexture',w,images{k});
end
for k=1:145
Screen('DrawTexture',w, texture1(k), [], leftposition);
Screen('DrawTexture',w, texture1(k+145), [], rightposition);
Screen('DrawLines', w, allCoords,...
lineWidthPix, black, [xCenter yCenter], 2);
Screen(w,'Flip');
pause(0.2);
end
%rating text
DrawFormattedText(w,'Rate distortion 0-9','center','center',[255 255 255]);
Screen(w,'Flip');
GetChar();
%press space to finish
DrawFormattedText(w,'press space to finish','center','center',[255 255 255]);
Screen(w,'Flip');
% Wait for a key press
KbStrokeWait;
% Clear the screen
sca;