forked from qMRLab/qMRLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.m
43 lines (41 loc) · 1.23 KB
/
startup.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
addpath(genpath(pwd))
% install octave package
if moxunit_util_platform_is_octave
installlist = {'struct','optim','io','statistics','image'};
for ii=1:length(installlist)
try
disp(['loading ' installlist{ii}])
pkg('load',installlist{ii})
catch
errorcount = 1;
while errorcount % try to install 30 times (Travis)
try
pkg('install','-forge',installlist{ii})
pkg('load',installlist{ii})
errorcount = 0;
catch err
errorcount = errorcount+1;
if errorcount>30
error(err.message)
end
end
end
end
end
end
try
NODDI_erfi(.8);
catch
% Compile Faddeeva
cur = pwd;
cd(fullfile(fileparts(mfilename('fullpath')),'External','Faddeeva_MATLAB'))
try
disp('Compile Faddeeva...')
Faddeeva_build
disp(' ...ok')
cd(cur)
catch
cd(cur)
error('Cannot compile External/Faddeeva_MATLAB, a function used by NODDI. Plz install a compiler and run Faddeeva_build. Alternatively, edit NODDI_erfi.')
end
end