%MainDrawPF: show the results of the PFs that are stored in the historyfiles

% APRENDIZAJE AUTOMÁTICO (G. Pajares y J. M. de la Cruz, Eds.)
% Editorial: RA-MA
% Capítulo 8: Monte Carlo II
% Autores: Eva Besada-Portas, Sergey M. Plis

clear;
resample=1; %0 --> SIS, 1 --> SIR, 2 --> Auxiliar PF

filename=sprintf('PFStepsData%d_%d',resample,1); %Filename used to save the intermediate positions
if exist(sprintf('%s.mat',filename))
    savesteps=[1 10 19 46 60 64 68 129 160 170 176 201]; %Steps where we want to save the graphics
    add={'a)','b)','c)','d)','e)','f)','g)','h)','i)','j)','k)','l)'}; %Initials to identify the graphics
    close all;
    DrawParticleFilterResults(filename,savesteps,add);
else
    warning(sprintf('%s doesn''t exists, so it can''t be drawn',filename));
end

filename=sprintf('PFStepsData%d_%d',resample,2); %Filename used to save the intermediate positions
if exist(sprintf('%s.mat',filename))
    savesteps=[1 3 11 12 46 70 100 129 154 160 170 201]; %Steps where we want to save the graphics
    add={'a)','b)','c)','d)','e)','f)','g)','h)','i)','j)','k)','l)'}; %Initials to identify the graphics
    close all;
    DrawParticleFilterResults(filename,savesteps,add);
else
    warning(sprintf('%s doesn''t exists, so it can''t be drawn',filename));
end

filename=sprintf('PFStepsData%d_%d',resample,3); %Filename used to save the intermediate positions
if exist(sprintf('%s.mat',filename))
    savesteps=[1 3 11 12 46 70 100 129 154 160 170 201]; %Steps where we want to save the graphics
    add={'a)','b)','c)','d)','e)','f)','g)','h)','i)','j)','k)','l)'}; %Initials to identify the graphics
    close all;
    DrawParticleFilterResults(filename,savesteps,add);
else
    warning(sprintf('%s doesn''t exists, so it can''t be drawn',filename));
end

