dynare ompD.mod
load('ompD_results.mat', 'oo_')
irf0=oo_.irfs;
save irf0
load irf0

dynare ompD1.mod noclearall
load('ompD1_results.mat', 'oo_')
irf1=oo_.irfs;
save irf1
load irf1

dynare ompD2.mod noclearall
load('ompD2_results.mat', 'oo_')
irf2=oo_.irfs;
save irf2
load irf2

dynare ompD3.mod noclearall
load('ompD3_results.mat', 'oo_')
irf3=oo_.irfs;
save irf3
load irf3

ending_cell={'_epsu'};

for ii=1:length(ending_cell)
HOR=1:options_.irf;
var={'x','ppi','int','r'};
figure
for jj=1:length(var)
subplot(2,2,jj) 
eval(['irf0.' var{1,jj},ending_cell{1,ii}]);
eval(['irf1.' var{1,jj},ending_cell{1,ii}]);
eval(['irf2.' var{1,jj},ending_cell{1,ii}]);
eval(['irf3.' var{1,jj},ending_cell{1,ii}]);
hold on
plot(HOR,[eval(['irf0.' var{1,jj},ending_cell{1,ii}])],'-k',HOR,[eval(['irf1.' var{1,jj},ending_cell{1,ii}])],'--g',HOR,[eval(['irf2.' var{1,jj},ending_cell{1,ii}])],':r',HOR,[eval(['irf3.' var{1,jj},ending_cell{1,ii}])],'-.b','LineWidth',1);
title([var{1,jj}] )
axis([0 20 -inf inf])
end
end
legend('q=0','q=1','q=2','q=3','Location','northeast')