-
Notifications
You must be signed in to change notification settings - Fork 36
/
CheckTAKDependencies.m
71 lines (58 loc) · 2.48 KB
/
CheckTAKDependencies.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function CheckTAKDependencies()
%
% Usage:
% CheckTAKDependencies;
%
% Description:
% Function to check required toolboxes for running Topographic Analysis Kit (TAK)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function Written by Adam M. Forte - Updated : 06/18/18 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
p=ver;
warn_flag=false;
ix=find(strcmp(cellstr(char(p.Name)),'TopoToolbox'));
if isempty(ix)
warning('Fatal error: TopoToolbox does not appear to be installed or on your path, available from https://github.com/wschwanghart/topotoolbox/')
end
if str2num(p(ix).Version)<2.3
warning('Version of TopoToolbox is pre 2.3, please download newest version, available from https://github.com/wschwanghart/topotoolbox/')
end
ix=find(strcmp(cellstr(char(p.Name)),'Image Processing Toolbox'));
if isempty(ix)
warning('Fatal error: You do not have a license for the Image Processing Toolbox, TopoToolbox will not function properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'Mapping Toolbox'));
if isempty(ix)
warning('Fatal error: You do not have a license for the Mapping Toolbox, TopoToolbox will not function properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'Curve Fitting Toolbox'));
if isempty(ix)
warning('You do not have a license for the Curve Fitting Toolbox, some functions will not work properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'Optimization Toolbox'));
if isempty(ix)
warning('You do not have a license for the Optimization Toolbox, some functions will not work properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'Statistics and Machine Learning Toolbox'));
if isempty(ix)
warning('You do not have a license for the Statistics and Machine Learning Toolbox, some functions will not work properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'Parallel Computing Toolbox'));
if isempty(ix)
warning('You do not have a license for the Parallel Computing Toolbox, some functions will not work properly')
warn_flag=true;
end
ix=find(strcmp(cellstr(char(p.Name)),'MATLAB'));
if str2num(p(ix).Version)<9.4
warning('Topographic Analysis Kit is optimized for MATLAB version post 2018a, some functions may not work properly')
end
if warn_flag
warning('Your system is missing one or more of the toolboxes necessary for all Topographic Analysis Kit functions to run, consider using the compiled versions of the codes')
end
end