Commit 00edc92e authored by Julian Kosciessa's avatar Julian Kosciessa
Browse files

create relative paths [when scripts are run]

parent d0e3d032
% This script can be used to try out the experiment behaviorally (defaults to word version) % This script can be used to try out the experiment behaviorally (defaults to word version)
%% specify psychtoolbox path
addpath(genpath('/Users/kosciessa/multi-attribute-task/Psychtoolbox'));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% enter subject ID & task variant %% %% enter subject ID & task variant %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -20,14 +17,21 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version ...@@ -20,14 +17,21 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version
%% add required paths %% add required paths
pn.root = ['/Users/kosciessa/multi-attribute-task/']; currentFile = mfilename('fullpath');
[pathstr,~,~] = fileparts(currentFile);
cd(fullfile(pathstr))
pn.root = pwd;
pn.CB = fullfile(pn.root, 'checker'); addpath(pn.CB);
pn.MAT = fullfile(pn.root, 'dotsx'); addpath(pn.MAT);
pn.SS = fullfile(pn.root, 'StateSwitch'); addpath(pn.SS);
pn.Stroop = fullfile(pn.root, 'Stroop'); addpath(pn.Stroop);
addpath(genpath(fullfile(pn.root, 'functions')));
addpath(genpath(fullfile(pn.root, 'helper')));
%% specify psychtoolbox path
pn.CB = [pn.root, 'checker',filesep]; addpath(pn.CB); addpath(genpath(fullfile(pn.root, 'Psychtoolbox')));
pn.MAT = [pn.root, 'dotsx',filesep]; addpath(pn.MAT);
pn.SS = [pn.root, 'StateSwitch',filesep]; addpath(pn.SS);
pn.Stroop = [pn.root, 'Stroop',filesep]; addpath(pn.Stroop);
addpath(genpath([pn.root, 'functions',filesep]));
addpath(genpath([pn.root, 'helper',filesep]));
%% create results directory %% create results directory
......
...@@ -17,18 +17,18 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version ...@@ -17,18 +17,18 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version
%% add required paths %% add required paths
if ispc currentFile = mfilename('fullpath');
pn.root = ['C:',filesep,'Users',filesep,'eeg',filesep,'Desktop',filesep,'StateSwitchEEG',filesep,'C_Paradigm',filesep]; [pathstr,~,~] = fileparts(currentFile);
else cd(fullfile(pathstr))
pn.root = [filesep,'Volumes',filesep,'LNDG',filesep,'stateSwitch',filesep,'B_paradigm',filesep,'StateSwitchEEG',filesep,'C_Paradigm_170922',filesep]; pn.root = pwd;
end
pn.CB = fullfile(pn.root, 'checker'); addpath(pn.CB);
pn.MAT = fullfile(pn.root, 'dotsx'); addpath(pn.MAT);
pn.SS = fullfile(pn.root, 'StateSwitch'); addpath(pn.SS);
pn.Stroop = fullfile(pn.root, 'Stroop'); addpath(pn.Stroop);
addpath(genpath(fullfile(pn.root, 'functions')));
addpath(genpath(fullfile(pn.root, 'helper')));
pn.CB = [pn.root, 'checker',filesep]; addpath(pn.CB);
pn.MAT = [pn.root, 'dotsx',filesep]; addpath(pn.MAT);
pn.SS = [pn.root, 'StateSwitch',filesep]; addpath(pn.SS);
pn.Stroop = [pn.root, 'Stroop',filesep]; addpath(pn.Stroop);
addpath(genpath([pn.root, 'functions',filesep]));
addpath(genpath([pn.root, 'helper',filesep]));
if ispc if ispc
addpath(['C:',filesep,'toolbox',filesep,'Psychtoolbox']); % PTB 3.0.11 addpath(['C:',filesep,'toolbox',filesep,'Psychtoolbox']); % PTB 3.0.11
else else
......
...@@ -17,25 +17,24 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version ...@@ -17,25 +17,24 @@ disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version
%% add required paths %% add required paths
currentFile = mfilename('fullpath');
[pathstr,~,~] = fileparts(currentFile);
cd(fullfile(pathstr))
pn.root = pwd;
pn.CB = fullfile(pn.root, 'checker'); addpath(pn.CB);
pn.MAT = fullfile(pn.root, 'dotsx'); addpath(pn.MAT);
pn.SS = fullfile(pn.root, 'StateSwitch'); addpath(pn.SS);
pn.Stroop = fullfile(pn.root, 'Stroop'); addpath(pn.Stroop);
addpath(genpath(fullfile(pn.root, 'functions')));
addpath(genpath(fullfile(pn.root, 'helper')));
if ispc if ispc
pn.root = ['D:',filesep,'Dokumente und Einstellungen',filesep,'guest',filesep,'Desktop',filesep,'StateSwitchMR',filesep,'C_Paradigm',filesep]; addpath(['C:',filesep,'toolbox',filesep,'Psychtoolbox']); % PTB 3.0.11
else else
disp('Setup no supported.'); addpath(genpath('/Users/Shared/Psychtoolbox/')); % PTB 3.0.13 (160606)
pn.root = ['/Users/kosciessa/Desktop/StateSwitchMR/C_Paradigm/'];
end end
pn.CB = [pn.root, 'checker',filesep]; addpath(pn.CB);
pn.MAT = [pn.root, 'dotsx',filesep]; addpath(pn.MAT);
pn.SS = [pn.root, 'StateSwitch',filesep]; addpath(pn.SS);
pn.Stroop = [pn.root, 'Stroop',filesep]; addpath(pn.Stroop);
addpath(genpath([pn.root, 'functions',filesep]));
addpath(genpath([pn.root, 'helper',filesep]));
% if ispc
% addpath(['C:',filesep,'toolbox',filesep,'Psychtoolbox']); % PTB 3.0.11
% else
% addpath(genpath('/Users/Shared/Psychtoolbox/')); % PTB 3.0.13 (160606)
% end
%% create results directory %% create results directory
setup.subjectsPath = [pn.root,filesep,'data',filesep, setup.subj '_MR_' datestr(now, 'yymmdd_HHMM') filesep]; mkdir(setup.subjectsPath); setup.subjectsPath = [pn.root,filesep,'data',filesep, setup.subj '_MR_' datestr(now, 'yymmdd_HHMM') filesep]; mkdir(setup.subjectsPath);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment