-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathincludeImogenPaths.m
More file actions
34 lines (28 loc) · 1.66 KB
/
includeImogenPaths.m
File metadata and controls
34 lines (28 loc) · 1.66 KB
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
function includeImogenPaths()
% Load the paths relative to the Imogen root path into the matlab path variable, giving access to
% all of the routines without having to change the current directory procedurally.
%--- Add default directories ---%
% Iterates over the list of directories provided below and adds them and all their
% subdirectories to the Matlab environmental path to access standard Imogen functionality.
directories = {'classes','equilibrium','experiment','fluid','enums','utils','sources', ...
'io','magnet','pressure','run','save','shifting', ...
'time','treadmill','users','utils','external','visualization', ...
'flux','gpuclass',''};
pathToHere = fileparts(mfilename('fullpath'));
addpath(pathToHere); % Add base Imogen directory without subdirectories.
for i=1:length(directories)
addpath(genpath([pathToHere filesep directories{i}]));
end
%--- Add compatibility directories ---%
% To deal with incompatibilities created by multiple Matlab versions, as well as missing
% toolboxes or related functionality, imogen includes a compat directory. Each
% subdirectory in this path stores contains the compatibility functions necessary to
% restore compatibility for Imogen in non-standard envrionmental situations. Add these
% paths only as needed.
compat = [filesep 'compat' filesep];
compWarn = 'Imogen:Compatibility';
%--- Matlab version ---%
version = ver('matlab');
verYear = str2double( version.Release(3:6) );
verLabel = version.Release(7);
end