Error using eval Must be a text scalar Error when Matlab is running Dynare driver code


I’m trying to run Thomas Winberry’s code for solving Krusell-Smith (see attached). When I run the dynamics.m file, when Dynare is running I get an error that says:

Error using eval
Must be a text scalar.

Error in firstOrderDynamics_polynomials.driver (line 3386)
M_.params(iParam) = eval(['economicParameters.' parameterName]);

Error in dynare (line 281)
    evalin('base',[fname '.driver']);

Error in dynamics (line 74)
	dynare firstOrderDynamics_polynomials

I assume this is a Dynare error because the firstOrderDynamics_polynomials.driver is m code generated by Matlab. I have run it on Dynare 5.0 and 5.1 on matlab 2020b. How should I fix this? Thanks for your help,

Cameron (1010.1 KB)

That looks like an incompatibility in the toolkit with recent Dynare versions.