Dear Robert,
Thank you for the update. I downloaded the latest version of both files but I keep running into errors. I must mention that i don’t have a dedicated GPU in my computer. What i have is an Intel(R) UHD Graphics 620. This is the new error message I am seeing now:
Hopenhayn1992
vfoptions =
struct with fields:
endogenousexit: 1
keeppolicyonexit: 1
ReturnToExitFn: @(a,s)0
ReturnToExitFnParamNames: {}
Error using arrayfun
All of the input arguments must be of the same size and shape.
Previous inputs had size 401 in dimension 1. Input #3 has size 1
Error in CreateReturnFnMatrix_Case1_Disc_Par2 (line 118)
Fmatrix=arrayfun(ReturnFn, d_gridvals(:,1), aprime1vals, a1vals, z1vals, ParamCell{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ValueFnIter_Case1_EndogExit (line 51)
ReturnMatrix=CreateReturnFnMatrix_Case1_Disc_Par2(ReturnFn, n_d, n_a, n_z, d_grid, a_grid, z_grid, ReturnFnParamsVec);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ValueFnIter_Case1 (line 296)
[V, Policy,ExitPolicy]=ValueFnIter_Case1_EndogExit(V0, n_d,n_a,n_z,d_grid,a_grid,z_grid, pi_z, ReturnFn, Parameters, DiscountFactorParamNames, ReturnFnParamNames, vfoptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Hopenhayn1992 (line 92)
[V,Policy,ExitPolicy]=ValueFnIter_Case1(n_d,n_a,n_z,d_grid,a_grid,z_grid, pi_z, ReturnFn, Params, DiscountFactorParamNames, , vfoptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^