PreprocessRegex.m 527 B

12345678910111213141516171819202122
  1. % function PreprocessRegex.m
  2. %
  3. % This function finds all the directories in the provided regular expression
  4. % and preprocesses the data for runIds from 1 to 8
  5. %
  6. % input:
  7. % regex - dir regex
  8. %
  9. % ex. PreprocessRegex('/mnt/scratch/ioannis/studyforrest_preprocessed/sub-*/')
  10. function PreprocessRegex(regex)
  11. dirs = glob(regex);
  12. runIds = 1:8;
  13. for dir=dirs'
  14. for runId=runIds
  15. fprintf('Processing run %d from %s\n', runId, dir{1});
  16. Preprocess(dir{1}, runId);
  17. end
  18. end
  19. end