This is an old revision of the document!
MATLAB PATH
startup.m
When MATLAB starts, it will look for a pathdef.m file in its startup directory. It should not be edited - leave the default MATLAB path containing only MATLAB native toolboxes. The rest should be configured dynamically, as explained below.
Start up folder (in the MATLAB icon | Properties | Start in ) (e.g. F:\Dropbox\Sources\Repos\matlab_config\MATLAB2014) allows controlling different paths and other settings via startup.m file placed in this folder, e.g.:
disp('Welcome to MATLAB2014'); set_sources_path; edit; EditorMacro('Alt-Control-h', @ig_createHeaderComment_dag); dbstop if error
The function set_sources_path.m can be something like the one below, to add all repositories but exclude .git folders:
addpath(genpath_exclude('F:\Dropbox\Sources\Repos','.git'));
The minimal startup.m can be just:
addpath(genpath_exclude('YOUR PATH TO REPOS','.git'));
See https://github.com/igorkagan/matlab_config for example that includes genpath_exclude.m