for jj=1:length(StimInd)
TxtRect= Screen('TextBounds',wPtr,BWords{StimIndRand(jj).wordb});
TxtLoc=[round(rect(3)/2-TxtRect(3)/2),round(rect(4)/2-TxtRect(4)/2)];
%TxtLoc无法修改,只能以word.g坐标为基准
for A=StimIndRand(randperm(length(StimIndRand)));
a=cell2mat(struct2cell(A(jj)));
if a(1)==1
Screen('DrawText', wPtr, GWords{StimIndRand(jj).wordg},TxtLoc(1)-100,TxtLoc(2));
Screen('DrawText', wPtr, BWords{StimIndRand(jj).wordb},TxtLoc(1)+100,TxtLoc(2));
vbl=Screen(wPtr, 'Flip', vbl+(ISI(ii,jj)*monitorFlipInterval));
vbl=Screen('Flip', wPtr, vbl+(flipSpd*monitorFlipInterval));
else
Screen('DrawText', wPtr, BWords{StimIndRand(jj).wordb},TxtLoc(1)-100,TxtLoc(2));
Screen('DrawText', wPtr, GWords{StimIndRand(jj).wordg},TxtLoc(1)+100,TxtLoc(2));
vbl=Screen(wPtr, 'Flip', vbl+(ISI(ii,jj)*monitorFlipInterval));
Screen('Preference', 'Verbosity', 0);
end
end
这里改了位置之后,就变成一组词在循环,是为什么呢?