function initWorkspaceGPMulticlass % function initWorkspaceGPMulticlass % % BRIEF % Add local subfolders and 3rd party libraries to Matlabs work space. % % Exemplary call from external position: % GPMULTIDIR = '/place/to/this/repository/'; % currentDir = pwd; % cd ( GPMULTIDIR ); % initWorkspaceGPMulticlass; % cd ( currentDir ); % % % Author: Alexander Freytag %% setup paths in user-specific manner % currently we do not have any dependencies, but if we would have some, % we would add them here %% add paths which come with this repository % add main path b_recursive = false; b_overwrite = true; s_pathMain = fullfile(pwd); addPathSafely ( s_pathMain, b_recursive, b_overwrite ) clear ( 's_pathMain' ); % some useful tiny scripts b_recursive = true; b_overwrite = true; s_pathModel = fullfile(pwd, 'gp-model'); addPathSafely ( s_pathModel, b_recursive, b_overwrite ) clear ( 's_pathModel' ); % some useful tiny scripts, mainly covariance functions. see the % gpml-toolbox for further alternatives. b_recursive = true; b_overwrite = true; s_pathMisc = fullfile(pwd, 'misc'); addPathSafely ( s_pathMisc, b_recursive, b_overwrite ) clear ( 's_pathMisc' ); %% 3rd party, untouched % nothing to add here end function addPathSafely ( s_path, b_recursive, b_overwrite ) if ( ~isempty(strfind(path, [s_path , pathsep])) ) if ( b_overwrite ) if ( b_recursive ) rmpath( genpath( s_path ) ); else rmpath( s_path ); end else fprintf('initWSImRet - %s already in your path but overwriting de-activated.\n', s_path); return; end end if ( b_recursive ) addpath( genpath( s_path ) ); else addpath( s_path ); end end