1
0

ptb_path.m 506 B

12345678910111213141516171819202122
  1. function ptb_path
  2. ptb_root = 'C:\_Toolboxes\Psychtoolbox3.0.12\';
  3. if ~any(which('Screen'))
  4. if exist(ptb_root,'dir')
  5. pp = genpath(ptb_root); addpath(pp);
  6. rmpath([ptb_root 'PsychBasic\MatlabWindowsFilesR2007a\']);
  7. rdir = [ptb_root 'PsychBasic\MatlabWindowsFilesR2007a\'];
  8. addpath(rdir);
  9. else
  10. try
  11. Screen('Windows')
  12. catch
  13. error('Psychtoolbox not found')
  14. end
  15. end
  16. end