Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
fixed folder creation warning
  • Loading branch information
Junpeng Lao committed Dec 28, 2015
1 parent 101f2ba commit 2b30276
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions imapLMMdisplay.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
foldername=['imapLMMoutput-' opt.type];
end

if ~exist(foldername, 'dir')
mkdir('foldername');
end

label=StatMap.label;
maptemp=StatMap.map;
if ~ismatrix(maptemp)
Expand All @@ -86,9 +90,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
cr=colormaprange;
switch opt.type
case 'model'% output model fitting and criterion map
%% create folder
mkdir(foldername)
% Rsquared
%% Rsquared
figure('NumberTitle','off','Name','R^2 of model','Position',[1 1 scrsz(3) scrsz(4)/2]);
maprangetmp=sort(squeeze(max(abs(maptemp(1:2,mask)))));
mapmax=maprangetmp(round(length(maprangetmp)*cr));
Expand Down Expand Up @@ -170,8 +172,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
cd(['./' foldername]);print('-depsc2','-r300','Model Criterion(with background)');cd('..');
end
case 'fixed'% output Fvalue map and mask according to MCC
%% create folder
mkdir(foldername)
%%
% pmptemp=StatMap.Pmap;
msktemp=StatMap.Pmask;
% output Statvalue map, Statvalue map with P<0.05 and Statvalue map
Expand Down Expand Up @@ -243,8 +244,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
end
end
case 'random'% output Fvalue map, beta map and mask according to MCC
%% create folder
mkdir(foldername)
%%
% pmptemp=StatMap.Pmap;
msktemp=StatMap.Pmask;
% output Statvalue map, Statvalue map with P<0.05 and Statvalue map
Expand Down Expand Up @@ -283,8 +283,7 @@ function imapLMMdisplay(StatMap,normalized,backgroundfile,cmap,colormaprange,dis
end
end
case {'predictor beta', 'model beta'} % output F/Tvalue map, beta map, pvalue map, and mask according to MCC
%% create folder
mkdir(foldername)
%%
betatmp=StatMap.beta;
% pmptemp=StatMap.Pmap;
msktemp=StatMap.Pmask;
Expand Down

0 comments on commit 2b30276

Please sign in to comment.