OLG Transition Path Error

Actually this afternoon I tried to incorporate transition path code to Chen(2010) sample codes, and get the same error. In the sample, n_a=[301,35], but TransitionPath_Case1_FHorz will check the size of inputs (line 260,261)

if ~all(size(a_grid)==[N_a, 1])
error(‘a_grid is not the correct shape (should be of size N_a-by-1) \n’)

In this case, LHS is [301+35,1] and RHS is [301*35,1], so it will stop running. I haven’t looked into the codes in details, not sure if it will cause problem if I change the calculation of N_a.

1 Like