function poolstackepos=getPoolStackEyePos(subjsData) opts = struct('WindowStyle','modal','Interpreter','none','Default','No'); answer = questdlg('This requires memory at runtime. Are you sure to continue?','Memory Warning','Yes','No',opts); if strcmpi(answer,'No'); error('Aborted getting pool stack eye position (consider cleaning workspace).'); end disp('Loading eye position data...'); subject1=subjsData(1).sbdata; subject2=subjsData(2).sbdata; s1s1gbi=getBehavioralInfos(subject1,1); s1s2gbi=getBehavioralInfos(subject1,2); s1s3gbi=getBehavioralInfos(subject1,3); s1s4gbi=getBehavioralInfos(subject1,4); s2s1gbi=getBehavioralInfos(subject2,1); s2s2gbi=getBehavioralInfos(subject2,2); s2s3gbi=getBehavioralInfos(subject2,3); s2s4gbi=getBehavioralInfos(subject2,4); twLabels={'preoffer1','offer1','delay1','offer2','delay2','startfix','choicego','choicesacc','choicemade'}; %poolstackepos(8,8)=struct('eyePosX',[],'eyePosY',[],'fracR',[]); poolstackepos(8,8)=struct('eyePosX',[],'eyePosY',[]); for tw=1:8 currtws1s1get=getEyeTracks(subject1,1,twLabels{tw},twLabels{tw+1}); currtws1s2get=getEyeTracks(subject1,2,twLabels{tw},twLabels{tw+1}); currtws1s3get=getEyeTracks(subject1,3,twLabels{tw},twLabels{tw+1}); currtws1s4get=getEyeTracks(subject1,4,twLabels{tw},twLabels{tw+1}); currtws2s1get=getEyeTracks(subject2,1,twLabels{tw},twLabels{tw+1}); currtws2s2get=getEyeTracks(subject2,2,twLabels{tw},twLabels{tw+1}); currtws2s3get=getEyeTracks(subject2,3,twLabels{tw},twLabels{tw+1}); currtws2s4get=getEyeTracks(subject2,4,twLabels{tw},twLabels{tw+1}); s1s1poolstackepos(tw).eyePosX=currtws1s1get.posX; s1s2poolstackepos(tw).eyePosX=currtws1s2get.posX; s1s3poolstackepos(tw).eyePosX=currtws1s3get.posX; s1s4poolstackepos(tw).eyePosX=currtws1s4get.posX; s2s1poolstackepos(tw).eyePosX=currtws2s1get.posX; s2s2poolstackepos(tw).eyePosX=currtws2s2get.posX; s2s3poolstackepos(tw).eyePosX=currtws2s3get.posX; s2s4poolstackepos(tw).eyePosX=currtws2s4get.posX; s1s1poolstackepos(tw).eyePosY=currtws1s1get.posY; s1s2poolstackepos(tw).eyePosY=currtws1s2get.posY; s1s3poolstackepos(tw).eyePosY=currtws1s3get.posY; s1s4poolstackepos(tw).eyePosY=currtws1s4get.posY; s2s1poolstackepos(tw).eyePosY=currtws2s1get.posY; s2s2poolstackepos(tw).eyePosY=currtws2s2get.posY; s2s3poolstackepos(tw).eyePosY=currtws2s3get.posY; s2s4poolstackepos(tw).eyePosY=currtws2s4get.posY; end for tw=1:8 for sn=1:4 poolstackepos(sn,tw).eyePosX= eval(['s1s' num2str(sn) 'poolstackepos(tw).eyePosX']); poolstackepos(sn,tw).eyePosY= eval(['s1s' num2str(sn) 'poolstackepos(tw).eyePosY']); poolstackepos(sn+4,tw).eyePosX=eval(['s2s' num2str(sn) 'poolstackepos(tw).eyePosX']); poolstackepos(sn+4,tw).eyePosY=eval(['s2s' num2str(sn) 'poolstackepos(tw).eyePosY']); end end end