rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
save_detailed_simulation_finals.m
1 function save_detailed_simulation_finals(savepath)
2 % function save_detailed_simulation_final(savepath)
3 %
4 % read in the detailed simulations and store final solutions in single
5 % file. By this faster L2-error determinatio is possible
6 % test_data is assumed to be generated by save_detailed_simulations before!
7 %
8 % files to be generated in the target path:
9 % detail_final.mat : for all mu, this file contains the final
10 % solution as one column
11 
12 % Bernard Haasdonk 29.3.2007
13 
14 if ~exist(savepath,'dir')
15  error('data directory does not exist. Please run save_detailed_simulations!')
16 end;
17 
18 save(fullfile(savepath,'UNFINISHED.lock'),'savepath');
19 
20 load(fullfile(savepath,'settings.mat'));
21 
22 % appropriately size U:
23 tmp = load(fullfile(savepath,'detail1.mat'));
24 U = tmp.U(:,end);
25 
26 % load simulation_data
27 for mu = 2:size(M,2)
28  tmp = load(fullfile(savepath,['detail',num2str(mu),'.mat']));
29  U = [U,tmp.U(:,end)];
30 end;
31 save(fullfile(savepath,'detail_finals'),'U');
32 
33 delete(fullfile(savepath,'UNFINISHED.lock'));
34 
35 
36 
37 
38 
39 
40 % TO BE ADJUSTED TO NEW SYNTAX
41 %| \docupdate
function save_detailed_simulations(model, model_data, M, savepath)
perform loop over detailed simulations and save results or check consistency with existing saved resu...