ET_PDToolkit/PDToolkit/@PDExperiment/buildExperiment.m

17 lines
387 B
Mathematica
Raw Normal View History

2018-06-12 14:49:55 +02:00
function[e] = buildExperiment(obj, path)
e = obj;
folder_contents = dir(path);
folders = [folder_contents.isdir];
folder_ind = find(folders);
j=1;
for s = 3:length(folder_ind) % 1 and 2 are . and ..
%% load subject s
subject_path = [path filesep folder_contents(folder_ind(s)).name];
subjects(j) = PDSubject(subject_path);
j=j+1;
end
e.subjects = subjects;