Home > marsbar > examples > batch > get_subjroot.m

get_subjroot

PURPOSE ^

FORMAT subjroot = get_subjroot()

SYNOPSIS ^

function subjroot = get_subjroot()

DESCRIPTION ^

 FORMAT subjroot = get_subjroot()

 Gets the root path for the example data.
 Looks first for an environment variable, if not defined, uses GUI

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function subjroot = get_subjroot()
0002 % FORMAT subjroot = get_subjroot()
0003 %
0004 % Gets the root path for the example data.
0005 % Looks first for an environment variable, if not defined, uses GUI
0006 subjroot = getenv('MARSBAR_EG_DATAPATH');
0007 % Otherwise fetch via the GUI
0008 if isempty(subjroot)
0009     subjroot = spm_get(-1, '', 'Root directory of example data');
0010 end
0011 if ~exist(fullfile(subjroot, 'sess1'), 'dir')
0012     error(sprintf('Expecting "sess1" directory in %s', subjroot))
0013 end
0014 return

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019