I cannot isolate one of the variables in my steady state system, hence can’t plug my SS directly in dynare. I used fsolve in Matlab, but I am not sure what is the most efficient way to proceed from now. Is there a way I can include the vectors I get from the simple matlab files, or do I necessarily need to re-write my _steadystate.m file as mentioned in the user guide?

If it’s just one variable you solve numerically for, have a look at the example3.mod in the Dynare examples folder. It shows how to use a small helper file within a steady_state_model-block

Thank you for this tip. I did it this way but now I get the following error: ERROR: gwgrow.mod: line 144, cols 8-14: Symbol z_ss cannot take arguments.

What would be the best way to do that? I tried by saving the vector of z_ss as data and loading it into dynare but I end up with the same problem, where z_ss is a vector. And I cannot just consider every scalar of z_ss separately, because z_ss will potentially be 120 by 1 in the actual final model.

Have you tried having the helper function return a vector and then using the preprocessor to write the vector entries into scalar parameters used in the model-block?

I found a way around this. I save each element of z_ss as zss_j (i.e. if z_ss is 3-by-1, then zss_1 = z_ss(1) , zss_2 = z_ss(2) , zss_3 = z_ss(3) ). Then I save all the parameters in Matlab as parameterfile.m. From here, I load parameterfile.mat in my .mod file. I think I am doing everything correctly, but when I run it, I get the following error:

Error using subsindex
Function ‘subsindex’ is not defined for values of class ‘struct’.

Error in gw_with_growth (line 383)
oo_.dr.eigval = check(M_,options_,oo_);

Error in dynare (line 223)
evalin(‘base’,fname) ;

I cannot figure out what the issue might be. I already used model diagnostics, but that doesn’t seem to be helping me much. Attached are the .mod and the .m files that I used. Any help would be appreciated.