forked from chri4354/nofeedback_trust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.m
executable file
·81 lines (73 loc) · 2.89 KB
/
launcher.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
%% Launcher script
% handles compatability across multiple installs on various machines.
% by matt.jaquiery@psy.ox.ac.uk
%
% Invokes experiments by reference to experimentName which is the
% experiment folder. The experiment folder MUST contain main.m which is
% called by this script.
%% clear workspace and create directories
clear all;
close all;
clc;
%experimentName = 'HaloEffect';
experimentName = 'AdvisorChoice';
%experimentName = 'PoliticalDifferences';
%forceResolution = [];
forceResolution = [1440 900];
feedbackEnabled = 0;
debugMode = 0;
shortMode = 0;
pathRoot = 'MattHome';
%% set path
switch pathRoot
case 'MattHome'
my_path = 'G:\Documents\University\Programming\nofeedback_trust_matt\'; % working directory
% if ~feedbackEnabled
% results_path = ['D:\Users\MJ\Filr\My Files\Results\' experimentName];
% else
% results_path = ['D:\Users\MJ\Filr\My Files\Results\' experimentName '\Feedback\'];
% end
results_path = 'G:\Documents\University\Programming\tmp';
stims_path = [my_path 'stims'];
osSlash = '\';
screenNumber = 2; % this tells psychtoolbox which screen to draw on
case 'MattWork'
my_path = 'C:\Users\mj221\Documents\Programming\MATLAB\nofeedback_trust\'; % working directory
if ~feedbackEnabled
results_path = ['C:\Users\mj221\Filr\My Files\Results\' experimentName];
else
results_path = ['C:\Users\mj221\Filr\My Files\Results\' experimentName '\Feedback\'];
end
stims_path = [my_path 'stims'];
osSlash = '\';
screenNumber = 1;
case 'MattLaptop'
my_path = 'C:\Users\micro\Documents\MATLAB\nofeedback_trust\'; % working directory
if ~feedbackEnabled
results_path = ['C:\Users\micro\Documents\Results\' experimentName];
else
results_path = ['C:\Users\micro\Documents\Results\' experimentName '\Feedback\'];
end
stims_path = [my_path 'stims'];
osSlash = '\';
screenNumber = 0;
Screen('Preference', 'SkipSyncTests', 1);
case 'AlexLaptop'
my_path = '/Users/Alex/Documents/MATLAB/Project/';
results_path = ['/Users/Alex/Documents/MATLAB/Results/' experimentName];
stims_path = [my_path 'stims'];
osSlash = '/';
screenNumber = 0;
Screen('Preference', 'SkipSyncTests', 1);
end
warning('off','MATLAB:rmpath:DirNotFound')
rmpath(genpath(my_path)); % remove the current path so we can add selectively
warning('on','MATLAB:rmpath:DirNotFound')
addpath(my_path); % add base folder
addpath(genpath([my_path experimentName])); % add experiment folder
addpath(genpath([my_path 'core'])); % add core files
% set some path extensions depending on the OS's slash direction
stim_folder = [osSlash 'sounds' osSlash 'Voice'];
cd(my_path)
screenTests
%main