getSubjectData.m 598 B

12345678910111213141516171819
  1. function [subjectdata] = getSubjectData(subj)
  2. % Returns subjectdata structure specified by subj
  3. % input subj can be double 1=subject1, 2=subject2
  4. % or char 'Pumbaa'=subject1, 'Vader'=subject2
  5. if nargin<1
  6. subj=1;
  7. end
  8. if (~ischar(subj) && subj==1) || (ischar(subj) && strcmpi(subj,'Pumbaa'))
  9. disp('loading data for subject 1, Pumbaa.');
  10. load('../data/subject1Data-110121-14h43.mat');
  11. end
  12. if (~ischar(subj) && subj==2) || (ischar(subj) && strcmpi(subj,'Vader'))
  13. disp('loading data for subject 2, Vader.');
  14. load('../data/subject2Data-110121-15h11.mat');
  15. end
  16. end