function [eyemat] = importeyes(actname); % Reads .edf to .mat file -- requires edf2mat toolbox % Extend as needed to include more Eyelink outputs/events/info % Data are in: ['P:' filesep 'ARC-Studies' filesep 'Pingball EEG' filesep % 'eye movements' filesep 'eyelink' filesep] % This script creates .mat in same folder where .edf are -> copy them first mdat=[]; actfile=[actname '.edf']; dat = Edf2Mat(actfile); mdat.evt=dat.Events.Messages.info; mdat.evT=dat.Events.Messages.time; mdat.x=dat.Samples.posX; mdat.y=dat.Samples.posY; mdat.p=dat.Samples.pupilSize; mdat.time=dat.Samples.time; mdat.efix=dat.Events.Efix; eyemat=[actname '.mat'] save(eyemat, 'mdat'); end