Error when running CoccoGomesMaenhout2005

Hi, I’m just starting out with the toolkit so I’m running some of the programs you’ve posted without any modification on my end.

When running the latest version of CGM2005 (downloaded from GitHub - robertdkirkby/LifeCycleOLGReadingList), I get the error pasted below. Any help on getting rid of it would be much appreciated. Thank in advance!

Error using EvalFnOnAgentDist_ValuesOnGrid_FHorz_Case1_PType
Too many input arguments.

Error in CoccoGomesMaenhout2005 (line 424)
ValuesOnGrid=EvalFnOnAgentDist_ValuesOnGrid_FHorz_Case1_PType(StationaryDist, Policy, FnsToEvaluate, Params,n_d,n_a,n_z,N_j,Names_i,d_grid, a_grid, z_grid_J, simoptions);
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

2 Likes

Fixed. Thanks for letting me know.
(Redownload CoccoGomesMaenhout2005.m )

ValuesOnGrid used to take StationaryDist as an input. But it doesn’t actually use it in the calculations at all. It was pointed out to me this is a bit misleading for the user. So it no longer has that as an input. I hadn’t realised CGM2005 was using this, so I hadn’t updated it to the current setup.

1 Like

Thanks very much for the quick reply. I appreciate it and will happily continue to report any bugs I might run into.

1 Like