% main.m
% setup model, run dynare and report results
% required files: create_param_files.m, calc_steady_state.m
%

%% SETUP
% --------------------------------------------------------------------------------------------------------------------------
clear all; close all; clc

% add dynare path if necessary
addpath c:\dynare\4.5.7\matlab

% which model file 
model_file      = 'EZrbc_PS2';

% set approximation order (needs to also be set in model file)
approxOrder = 3;

% create parameter files
create_param_files;

%% SOLVE MODEL
% loop over parameter files
for ccc = 1:n_comp

    % Load parameter file
    load(['prm_',num2str(ccc)])
  
    calc_steady_state;

    eval([ 'dynare ' model_file '.mod noclearall']);
end 