Which subroutine generates ghx and ghu?

Hi, How can I generate decision-rule matrix (ghx and ghu) by giving a set of parameters (My model is linear)?
Since I’d like to make it in a loop, it is convenient for me to use a subroutine that takes parameters as input and generates ghx and ghu as outputs. In version 3, dr1.m could be used on this purpose but I am now using version 4.3.3…
Any advice would be appreciated.

By iterating over set_param_value and resol.m. See e.g. the replication codes to Born/Pfeifer (2014): Risk matters: Comment at the AER. In smm_diff_function.m, we loop over something like this:

[code]%% set parameter for use in Dynare
set_param_value(‘sigma_x’,xopt(1)); % TFP volatility

[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_); %run model solution in Dynare

if info %solution was not successful
fval=Inf; %return with penalty
else
% compute what you want here
end
[/code]

See also [Loop over parameters)

Johannes, I appreciate your support! It is really valuable.