33 lines
721 B
Matlab
33 lines
721 B
Matlab
|
|
%% Change working directory of MATLAB into the location of this file
|
|
root=[pwd filesep 'data' filesep];
|
|
|
|
cd(root)
|
|
subjects=dir('s*');
|
|
|
|
|
|
for i=1:length(subjects)
|
|
s(i) = PDSubject([root,subjects(i).name]);
|
|
end
|
|
|
|
s = s.loadData;
|
|
s = s.setPattern('stimulus start', 'Stream BEGIN');
|
|
s = s.setPattern('trial start', 'TRIALID');
|
|
s = s.setPattern('baseline start', 'TRIALID');
|
|
|
|
s = s.setPatternRelativeToPattern('baseline start', 'baseline end', 500);
|
|
s = s.setPatternRelativeToPattern('stimulus onset', 'trial end', +3300);
|
|
|
|
s = s.setLabel('T1 BEGIN');
|
|
s = s.setLabel('T2 BEGIN');
|
|
s = s.rebuild;
|
|
|
|
e = PDExperiment(s, 'Average');
|
|
e.settings.BlinkExtension = [50 50];
|
|
e = e.consolidateSettings;
|
|
|
|
e = preprocess(e);
|
|
|
|
|
|
|