-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.m
36 lines (29 loc) · 860 Bytes
/
setup.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
%%% Add all subfolders to path
% Credit: https://github.com/CAOR-MINES-ParisTech
% 2020/6/23
addpath(pwd);
% Add directories to the Matlab path.
cd orbit;
addpath(genpath(pwd));
cd ..;
cd plots;
addpath(genpath(pwd));
cd ..;
cd utils;
addpath(genpath(pwd));
cd ..;
% Ask user if the path should be saved or not
fprintf('Ground Track added to Matlab''s path.\n');
response = input('Save path for future Matlab sessions? [Y/N] ', 's');
if strcmpi(response, 'Y')
failed = savepath();
if ~failed
fprintf('Path saved: no need to call setup next time.\n');
else
fprintf(['Something went wrong.. Perhaps missing permission ' ...
'to write on pathdef.m?\nPath not saved: ' ...
'please re-call setup next time.\n']);
end
else
fprintf('Path not saved: please re-call setup next time.\n');
end