Skip to content

Commit 1f021c8

Browse files
bronsolobronsolo
authored andcommitted
declare plotlyToolboxDir earlier
1 parent e99a6fa commit 1f021c8

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

plotly/plotly_setup_aux/plotlycleanup.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@
3737
dircount = dircount + 1;
3838
end
3939

40-
% MATLAB toolbox plotly
41-
if exist(fullfile(matlabroot,'toolbox','plotly'), 'dir');
42-
plotlyDirs{end+1} = fullfile(matlabroot,'toolbox','plotly');
40+
% plotly toolbox directory
41+
plotlyToolboxDir = fullfile(matlabroot,'toolbox','plotly');
42+
43+
% MATLAB toolbox plotly
44+
if exist(plotlyToolboxDir, 'dir');
45+
plotlyDirs{end+1} = plotlyToolboxDir;
4346
end
4447

4548
for d = 1:length(plotlyDirs)

plotly/plotly_setup_aux/plotlyupdate.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ function plotlyupdate(varargin)
7878
dircount = dircount + 1;
7979
end
8080

81-
% MATLAB toolbox plotly
82-
if exist(fullfile(matlabroot,'toolbox','plotly'), 'dir');
83-
plotlyDirs{end+1} = fullfile(matlabroot,'toolbox','plotly');
81+
% plotly toolbox directory
82+
plotlyToolboxDir = fullfile(matlabroot,'toolbox','plotly');
83+
84+
% MATLAB toolbox plotly
85+
if exist(plotlyToolboxDir, 'dir');
86+
plotlyDirs{end+1} = plotlyToolboxDir;
8487
end
8588

8689
%----update if necessary----%
@@ -195,9 +198,6 @@ function plotlyupdate(varargin)
195198
end
196199
end
197200

198-
% plotly toolbox directory
199-
plotlyToolboxDir = fullfile(matlabroot,'toolbox','plotly');
200-
201201
% remove old plotlyclean scripts
202202
pcScripts = which('plotlycleanup.m','-all');
203203

0 commit comments

Comments
 (0)