0001 function save_batch_jd(lukestructs,dkepath,savestr,savepath)
0002
0003
0004
0005 if nargin < 4,
0006 savepath = '.';
0007 end
0008 if nargin < 3,
0009 savestr = '';
0010 end
0011
0012 if ~isempty(savestr),
0013 savestr = ['_',savestr];
0014 end
0015
0016 filename = [savepath,filesep,'LUKE_BATCH',savestr,'.mat'];
0017
0018 ifilenum = 0;
0019 while exist(filename,'file'),
0020 ifilenum = ifilenum + 1;
0021 filename = [savepath,filesep,'LUKE_BATCH',savestr,'_',num2str(ifilenum),'.mat'];
0022 end
0023
0024 save(filename,'lukestructs','dkepath')
0025
0026 if isfield(lukestructs{1},'job'),
0027 disp(['Jobs info saved in ',filename])
0028 else
0029 disp(['LUKE Results saved in ',filename])
0030 end