-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBubbleAnalyserApp.m
executable file
·54 lines (51 loc) · 1.72 KB
/
BubbleAnalyserApp.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
%Script to wrap the opening of the APP, so we can check the current Matlab
%version
%
% Syntax: BubbleAnalyserApp()
%
% Inputs:
% none
%
% Outputs:
% none
%
% Author: Reyes, Francisco; Quintanilla, Paulina; Mesa, Diego
% email: [email protected],
% Website: https://gitlab.com/frreyes1/bubble-sizer
% Copyright Feb-2021;
%
%This file is part of Bubble Analyser
%
% Bubble Analyser is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation version 3 only of the License.
%
% Bubble Analyser is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Bubble Analyser. If not, see <https://www.gnu.org/licenses/>.
%
%------------- BEGIN CODE --------------
%test Matlab version
v = ver('matlab');
current_ver = datetime(v.Date);
test_ver = datetime(2020,01,01);
if current_ver < test_ver
uiwait(msgbox({'This app has been tested on Matlab 2020 or newer'},...
'Matlab version mismatch','warn'));
drawnow
end
%test if certain toolboxes are present
pat = '(?<=^.+[\\/]toolbox[\\/])[^\\/]+';
test_tlbx = regexp(which('impixel'), pat, 'match', 'once'); %test if impixel exist
if isempty(test_tlbx)
uiwait(msgbox({'Bubble Analyser needs Image Processing Toolbox to work. Please install using the Add-on Manager'},...
'Toolbox missing','warn'));
drawnow
end
%run the app anyway, but the user has been warned
clearvars
Interface