close all;
clear all;
fclose('all');
clc;

%run once to set up model and workspace
dynare test.mod noclearall;

%define grid
gamma_MP = 1.95:0.6:2.55;
gamma_FP = -0.05:0.2:0.15;

results=cell(length(gamma_MP),length(gamma_MP));
for i = 1:length(gamma_MP)
    for j = 1:length(gamma_FP)
        set_param_value('gamma_R_PI',gamma_MP(i));
        set_param_value('gamma_tau',gamma_FP(j));
        info=stoch_simul(var_list_);
        if info==0
            results{i,j}=oo_;
        else
            %model could not be solved
            fprintf('model cannot be solved for gamma_R_PI=%3.2f and gamma_tau=%3.2f\n',gamma_MP(i),gamma_FP(j))
        end
    end
end

