17 lines
387 B
Mathematica
17 lines
387 B
Mathematica
|
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;
|