vfitoolkit / IntroToLifeCycleModels

Gradually build up a life-cycle model
GNU General Public License v3.0
18 stars 10 forks source link

No d variable #5

Closed aledinola closed 2 months ago

aledinola commented 4 months ago

In line 6 of LifeCycleModel10.m it says

% Essentially just set n_d=[], d_grid=[], and modify return function.

but n_d=[] does not work, one has to set n_d=0. d_grid=[] is fine

Also, on line

size(Policy) % which is the same as [length(n_d)+length(n_a),n_a,n_z,N_j] % Note that length(n_d)=0

The problem is that length(n_d)=1, not zero. And the size of Policy is 1n_an_z*N_j

robertdkirkby commented 2 months ago

fixed. thanks.