@@ -16,19 +16,19 @@ function StatSTEM()
1616% Contact: sandra.vanaert@uantwerpen.be
1717% --------------------------------------------------------------------------
1818
19- forCompiling = 0 ; % Put to 1 when compiling
20-
21- % Load functions
22- path = mfilename(' fullpath' );
23- path = path(1 : end - 9 );
24- pathF = [path ,filesep ,' functions' ]; % Path for loading fit functions
25- pathG = [path ,filesep ,' GUI' ]; % Path for loading GUI functions
26- addpath([path ,' ;' ,genpath(pathF ),' ;' ,genpath(pathG )])
27-
2819% Start a splash screen
29- if forCompiling
20+ if isdeployed
3021 splashImg = imread(' splash.png' );
22+ imgPan = imread(' imgGui.png' );
3123else
24+ % Load functions
25+ path = mfilename(' fullpath' );
26+ path = path(1 : end - 9 );
27+ pathF = [path ,filesep ,' functions' ]; % Path for loading fit functions
28+ pathG = [path ,filesep ,' GUI' ]; % Path for loading GUI functions
29+
30+ addpath([path ,' ;' ,genpath(pathF ),' ;' ,genpath(pathG )])
31+ imgPan = imread([pathG ,filesep ,' imgGui.png' ]);
3232 splashImg = imread([pathG ,filesep ,' splash.png' ]);
3333 spl = splash(splashImg );
3434end
@@ -70,21 +70,15 @@ function StatSTEM()
7070warning(' on' ,' all' )
7171
7272% Create left panels
73- h = panelMaker(h ,' Preparation' ,forCompiling );
74- h = panelMaker(h ,' Fit Model' ,forCompiling );
75- h = panelMaker(h ,' Analysis' ,forCompiling );
73+ h = panelMaker(h ,' Preparation' ,isdeployed );
74+ h = panelMaker(h ,' Fit Model' ,isdeployed );
75+ h = panelMaker(h ,' Analysis' ,isdeployed );
7676
7777% Create panel for loading and storing files
7878h.left.loadStore.panel = uipanel(' Parent' ,h .left .main ,' units' ,' normalized' ,' Position' ,[0 0 1 0.1 ],' Title' ,' Load/save files' ,' FontSize' ,10 );% ,'ShadowColor',[0.95 0.95 0.95],'ForegroundColor',[0.95 0.95 0.95],'HighlightColor',[0.95 0.95 0.95],'BackgroundColor',[0.95 0.95 0.95]);
7979h.left.loadStore.load = uicontrol(' Parent' ,h .left .loadStore .panel ,' units' ,' normalized' ,' Position' ,[0.02 0.2 0.47 0.75 ],' String' ,' Load' ,' FontSize' ,10 );
8080h.left.loadStore.save = uicontrol(' Parent' ,h .left .loadStore .panel ,' units' ,' normalized' ,' Position' ,[0.49 0.2 0.47 0.75 ],' String' ,' Save' ,' FontSize' ,10 ,' Enable' ,' off' );
8181
82- % Create image of StatSTEM
83- if forCompiling
84- imgPan = imread(' imgGui.png' );
85- else
86- imgPan = imread([pathG ,filesep ,' imgGui.png' ]);
87- end
8882h = panelStatSTEM(h ,imgPan );
8983
9084%% Create right panels
@@ -156,7 +150,7 @@ function StatSTEM()
156150% Limit minimum size and make window appear on full screen
157151% set(h.fig,'Position',[1 1 screen(3) screen(4)])
158152set(h .fig ,' Visible' ,' on' )
159- if ~forCompiling
153+ if ~isdeployed
160154 close(spl ) % Close splash window
161155end
162156waitfor(h .fig ,' Visible' ,' on' )
0 commit comments