1 % script performing a detailed simulation with empirical interpolated
2 % operators comparing the result with a regular detailed simulation.
4 % required variables that need to be set:
10 % -
'sim_data': output of regular detailed simulation
11 % -
'ei_sim_data': output of detailed simulation with empirical
12 % interpolated operators.
14 disp([
'comparison between detailed simulation with and without', ...
16 tmp = load(fullfile(rbmatlabresult,CRBfname));
17 detailed_data = tmp.detailed_data;
19 %model = model.set_mu(model, mu_default);
20 %sim_data = detailed_simulation(model, detailed_data);
21 plot_params.title =
'detailed simulation without interpolation';
23 model.M = cellfun(@(x)(size(x,2) - model.Mstrich), detailed_data.BM,
'UniformOutput',
true);
25 %model = model.set_mu(model, mu_default);
26 ei_sim_data = detailed_ei_simulation(model, detailed_data);
27 plot_params.title =
'detailed simulation with empirical interpolation';
28 plot_sim_data(model, detailed_data, ei_sim_data, plot_params);
29 plot_params.title =
'error';
31 diff_data.U = abs(diff_data.U - ei_sim_data.U);
32 diff_plot_params = plot_params;
33 diff_plot_params.clim = [0-eps, max(max(diff_data.U))];
34 plot_sim_data(model, detailed_data, diff_data, diff_plot_params);
35 disp([
'maximum l-infty error:',num2str(max(max(diff_data.U)))]);
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.