StoNeoClassicalGrowthModel-Error with index

Sorry to bother, when I tried to run StochasticNeoClassicalGrowthModel but got the following error message, it seems that has problem calling the function CreateReturnFnMatrix_Case1_Disc_Par2
Error using CreateReturnFnMatrix_Case1_Disc_Par2
Index exceeds the number of array elements. Index must not exceed 0.
Error in ValueFnIter_Case1 (line 533)
ReturnMatrix=CreateReturnFnMatrix_Case1_Disc_Par2(ReturnFn, n_d, n_a, n_z, d_grid,
a_grid, z_grid, ReturnFnParamsVec);

And I checked the details inside this function, found error message shows up when running this:
Fmatrix=arrayfun(ReturnFn, aprime1vals, a1vals, z1vals, ParamCell{:});

Thanks for any advice.

1 Like

I just downloaded
“StochasticNeoClassicalGrowthModel.m”
from

Ran and worked without error. My guess is that you have someting lying around in your Matlab ‘workspace’. Try clear all and then run again, hope that helps.

1 Like