dynare macroproject.mod;
matrix1 = oo_.irfs;
save macroprojectresponses.mat matrix1;
irf1=oo_.irfs;
save irf1;
load irf1;

dynare departshock1.mod;
matrix2 = oo_.irfs;
save departshock1results.mat matrix2;
load('macroprojectresponses.mat', 'oo_');
load('departshock1results.mat', 'oo_');
irf2=oo_.irfs;
save irf2;
load irf2;

ending_cell={'_eps_k'};
%'y', 'dp', 'cs', 'cb', 'h', 'hs', 'r', 'qh', 'qz'
for ii=1:length(ending_cell)
HOR=1:options_.irf;
var={'y', 'dp', 'cs', 'cb'};
figure
for jj=1:length(var)
subplot(1,2,jj) 
eval(['irf1.' var{1,jj},ending_cell{1,ii}]);
eval(['irf2.' var{1,jj},ending_cell{1,ii}]);
load irf1
load irf2
hold on
plot(HOR,[eval(['irf1.' var{1,jj},ending_cell{1,ii}])],'-k',HOR,[eval(['irf2.' var{1,jj},ending_cell{1,ii}])],'--r','LineWidth',2) ;
title([var{1,jj}] )
end
end



