-
Notifications
You must be signed in to change notification settings - Fork 51
/
isetPath.m
46 lines (40 loc) · 1.43 KB
/
isetPath.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
function isetPath(isetDir)
% Set Matlab directory path for ISET
%
% isetPath(isetDir)
%
% Set up the path to the functions and data called by ISET. Place this
% function in a location that is in the Matlab path at start-up. When
% you wish to initialize the ISET path, or add a path for one of the
% tools boxes, call this function.
%
% Many people simply change to the ISET root directory and type
% isetPath(pwd)
%
% Another possibility is to include the ISET root directory on your
% path, and then invoke isetPath(isetRootPath).
%
% We recommend against putting the entire ISET distribution on your path,
% permanently. The reason is this: Future distributions may change a
% directory organization. In that case, you may get path errors or other
% problems when you change distributions.
%
% Examples:
% isetDir = 'c:\myhome\Matlab\ISET'; isetPath(isetDir);
% cd c:\myhome\Matlab\ISET; isetPath(pwd);
%
% copyfileright ImagEval Consultants, LLC, 2003.
fprintf('ISET root directory: %s\n',isetDir)
% Adds the root directory of the ISET tree to the user's path
addpath(isetDir);
% Generates a list of the directories below the ISET tree and adds them.
addpath(genpath(isetRootPath));
% Remove paths related to version control.
vcs_dirs = {'.git', '.svn'};
for i = 1:length(vcs_dirs)
vcs_path = fullfile(isetRootPath, vcs_dirs{i});
if ~isempty(dir(vcs_path)); rmpath(vcs_path); end
end
% Refreshes the path.
path(path);
return;