params=[0.75, 0.99, 1.1];
first_time = 1;
ending_cell={'_e_A','_e_G'};
for i=1:length(params)
    if first_time
        dynare RBC noclearall;
        first_time = 0;
    else
        set_param_value('psi',params(i));
        info = stoch_simul(var_list_);
        if info;
          disp(['Computation fails for psi = ' num2str(psi)]);
        end
    end
    irf_cell{i,1}=oo_.irfs;
    save irf_cell{i,1}
    load irf_cell{i,1}
end
    for ii=1:length(ending_cell)
        x=1:options_.irf;
        var={'y','c','k','l','invest'};
        var2={'output','consumption','capital','labor','investment'};
        shock={'technology shock', 'government spending shock'};
        figure('Name',[shock{1,ii}],'NumberTitle','off');
        for jj=1:length(var)
            subplot(3,2,jj)
            for i=1:length(params)
                plots_cell{jj}={plot(x,[eval(['irf_cell{i,1}.' var{1,jj},ending_cell{1,ii}])])};
                hold on
                title([var2{1,jj}])
                ax=gca;
                ax.YAxis.Exponent = 0;
            end
        end
    end