From 44fbbf308b6523a91e84eca3e8eb3ba7f4be2d3d Mon Sep 17 00:00:00 2001 From: huangpei90 Date: Wed, 15 Jul 2020 13:55:01 +0800 Subject: [PATCH] Update attention_simulation_contri_plots.m --- attention_simulation_contri_plots.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/attention_simulation_contri_plots.m b/attention_simulation_contri_plots.m index 72553de..d200b1c 100644 --- a/attention_simulation_contri_plots.m +++ b/attention_simulation_contri_plots.m @@ -1,4 +1,4 @@ -function attention_simulation_contri_plots(res) +function attention_simulation_contri_plots(res_file) % Plot results from the output of attention_simulation.m % This function queries the output for the parameters we are interested in % and generate plots comparing the ground truth against the various @@ -7,11 +7,10 @@ function attention_simulation_contri_plots(res) % If the input res is undefined, we load the sample result from % sample_results/att_sim_results.mat % -% attention_simulation_contri_plots(res) +% attention_simulation_contri_plots(res_file) -if ~exist('res', 'var') || isempty(res) - res = load(fullfile(fileparts(mfilename('fullpath')), ... - 'sample_results', 'att_sim_results.mat')); +if ~exist('res_file', 'var') || isempty(res_file) + res_file = fullfile(fileparts(mfilename('fullpath')),'sample_results', 'att_sim_results.mat'); end % define which values we are interested in @@ -25,6 +24,7 @@ function attention_simulation_contri_plots(res) 179,205,227]; cmap = cmap/255; +res = load(res_file); res = res.results; %Find the indices for the 3 rows