Skip to content

Commit 2b30276

Browse files
author
Junpeng Lao
committed
minor change
fixed folder creation warning
1 parent 101f2ba commit 2b30276

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

imapLMMdisplay.m

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
7676
foldername=['imapLMMoutput-' opt.type];
7777
end
7878

79+
if ~exist(foldername, 'dir')
80+
mkdir('foldername');
81+
end
82+
7983
label=StatMap.label;
8084
maptemp=StatMap.map;
8185
if ~ismatrix(maptemp)
@@ -86,9 +90,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
8690
cr=colormaprange;
8791
switch opt.type
8892
case 'model'% output model fitting and criterion map
89-
%% create folder
90-
mkdir(foldername)
91-
% Rsquared
93+
%% Rsquared
9294
figure('NumberTitle','off','Name','R^2 of model','Position',[1 1 scrsz(3) scrsz(4)/2]);
9395
maprangetmp=sort(squeeze(max(abs(maptemp(1:2,mask)))));
9496
mapmax=maprangetmp(round(length(maprangetmp)*cr));
@@ -170,8 +172,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
170172
cd(['./' foldername]);print('-depsc2','-r300','Model Criterion(with background)');cd('..');
171173
end
172174
case 'fixed'% output Fvalue map and mask according to MCC
173-
%% create folder
174-
mkdir(foldername)
175+
%%
175176
% pmptemp=StatMap.Pmap;
176177
msktemp=StatMap.Pmask;
177178
% output Statvalue map, Statvalue map with P<0.05 and Statvalue map
@@ -243,8 +244,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
243244
end
244245
end
245246
case 'random'% output Fvalue map, beta map and mask according to MCC
246-
%% create folder
247-
mkdir(foldername)
247+
%%
248248
% pmptemp=StatMap.Pmap;
249249
msktemp=StatMap.Pmask;
250250
% output Statvalue map, Statvalue map with P<0.05 and Statvalue map
@@ -283,8 +283,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
283283
end
284284
end
285285
case {'predictor beta', 'model beta'} % output F/Tvalue map, beta map, pvalue map, and mask according to MCC
286-
%% create folder
287-
mkdir(foldername)
286+
%%
288287
betatmp=StatMap.beta;
289288
% pmptemp=StatMap.Pmap;
290289
msktemp=StatMap.Pmask;

0 commit comments

Comments
 (0)