-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.m
48 lines (41 loc) · 1017 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% SETUP
% This scrtipt is used to setup the system enviroment for the solver.
% Necessory paths will be added.
%
% Please run this secript at the root of the folder.
%
% Yiming @ Uinversity of Edinburgh
clear;
clc;
folderLocation = pwd;
% add paths
disp('* Add necessary paths...');
if isunix || ismac
addpath(folderLocation);
addpath([folderLocation '/src']);
addpath([folderLocation '/examples']);
elseif ispc
addpath(folderLocation);
addpath([folderLocation '\src']);
addpath([folderLocation '\examples']);
else
error(' Cannot determine your OS.')
end
disp(' Done.')
% try to save the paths to Matlab
reply = input('* Do you want save the paht? Y/N [Y]:','s');
if isempty(reply)
reply = 'Y';
end
if strcmpi(reply,'y')
flag = savepath;
if flag == 1
disp(' Cannot save the path. Please check if you have admin rights.')
else
disp(' Path saved successfully.');
end
else
disp(' Saving path aborted.');
end
disp('Done.');
clear;