I am using Psychtoolbox on MATLAB R2020a on Mac OS. I am trying to get the fixation cross to stay on the screen for 10 seconds before displaying the next stimulus. I have tried WaitSec() but this did not work.
% Experimental instructions
line1 = 'Choose the sequence with the highest mean';
line2 = '\n Press any key when you are ready to begin';
% Draw all the text in one go
Screen('TextSize', window, 40);
Screen('TextFont', window, 'Ariel');
DrawFormattedText(window, [line1 line2],...
'center', 'center', white);
Screen('Flip', window);
KbStrokeWait;
% Fixation cross
Screen('DrawLines', window, allCoords,lineWidthPix, white, [xCenter yCenter], 2);
% trial 1
DrawFormattedText(window, sprintf(seq1), rightX, rightY, [0 1 0]);
DrawFormattedText(window, sprintf(seq2), leftX, leftY, [1 0 1]);
DrawFormattedText(window, sprintf(seq3), upX, upY, [1 1 0]);