Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5791b17d authored by hhakim's avatar hhakim
Browse files

Avoid creation in demo scripts of output or Figures folders if exist already.

parent fe228306
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,9 @@ function BSL()
end
close(h);
mkdir 'output'
if(~ exist('output'))
mkdir 'output'
end
matfile = [ 'output' filesep 'results_BSL_user' ];
save(matfile,'resDist','Sparsity','RCG_list','compute_Times','Ntraining','nb_MEG_matrix');
......
......@@ -66,7 +66,9 @@ function Fig_BSL()
%% figure configuration
figure_dir = ['.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
load(matfile);
......
......@@ -167,7 +167,9 @@ function speed_up_fourier()
runPath=which(mfilename);
pathname = fileparts(runPath);
figure_dir = ['.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
figure_name=[figure_dir filesep 'Fourier-speed_up'];
print(figure_name, format_fig);
......
......@@ -125,7 +125,9 @@ function demo_fact_hadamard()
runPath=which(mfilename);
pathname = fileparts(runPath);
figure_dir = [ '.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
......
......@@ -193,7 +193,9 @@ function norm_hadamard()
runPath=which(mfilename);
pathname = fileparts(runPath);
figure_dir = ['.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
figure_name=[figure_dir filesep 'Hadamard-norm'];
print(figure_name, format_fig);
......
......@@ -220,7 +220,9 @@ function speed_up_hadamard()
runPath=which(mfilename);
pathname = fileparts(runPath);
figure_dir = [ '.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
figure_name=[figure_dir filesep 'Hadamard-speed_up'];
print(figure_name, format_fig);
......
......@@ -83,7 +83,9 @@ function Fig_runtime_comparison()
% figure configuration
figure_dir = [ '.' filesep 'Figures'];
mkdir(figure_dir)
if(~ exist(figure_dir))
mkdir(figure_dir)
end
format_fig='-dpng';
......
......@@ -192,7 +192,9 @@ function runtime_comparison()
runPath=which(mfilename);
pathname = 'output'
mkdir(pathname)
if(~ exist(pathname))
mkdir(pathname)
end
matfile = fullfile(pathname, 'runtime_comparison.mat');
save(matfile,'t_faust','t_dense','params');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment