Steady state in GK2011 model

I’m currently trying to replicate the code for GK11. So far I corrected some expressions concerning the Breaking features in version 4.6. But I’m getting this error in the first fsolve in the steady-state file:

“Error in evaluate_steady_state_file (line 63)
updated_params_flag = max(abs(params1-params)) > 1e-10 …
Error in evaluate_steady_state (line 254)
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, options,steadystate_check_flag);
Error in resol (line 77)
[dr.ys,M.params,info] = evaluate_steady_state(oo.steady_state,M,options,oo,~options.steadystate.nocheck);”

Would appreciate any help. Thank you!

f_KL.m (1.2 KB)
f_mom.m (1.1 KB)
f_simul.m (3.4 KB)
Getler2011.mod (10.8 KB)
Getler2011_steadystate.m (6.0 KB)

You are supposed to pass a params-vector back. Instead, you try to set M_.params and pass a params structure back.