clear all, clc, clf, close all
d0=fileparts([pwd,filesep]);
d0=d0(1:strfind(d0,'trunk')+4);
force = true;
root = 'DOnumPap';

files = dir(sprintf('%s/Save/%s/LockStochSym*',d0,root));

for iii = 1:length(files)
   load(sprintf('%s/Save/%s/%s/param.mat',d0,root,files(iii).name)) ;
   app = rmfield(app,'savemat');
   file2 = dir(sprintf('%s/Save/%s/%s/0*.mat',d0,root,files(iii).name));
   k = 0;
   LockExchangeSymPlots_num2
   for jjj = length(file2):-floor(length(file2)/2):1
       %%
       if ~exist(sprintf('%s/Save/%s/%s/%05d.jpg',d0,root,...
                files(iii).name,jjj),'file') || force
       clf , close all
       load(sprintf('%s/Save/%s/%s/%s',d0,root,files(iii).name,file2(jjj).name)) ;
       try
           LockExchangeSymPlots_num2
           print('-dpng','-r400',sprintf('%s/Save/%s/%s/%05d',d0,root,files(iii).name,jjj));
           fprintf('%s/Save/%s/%s/%05d\n',d0,root,files(iii).name,jjj)
       end
       k=1;    
       end
   end
end