# OLG Transition Path Error

**URL:** https://discourse.vfitoolkit.com/t/olg-transition-path-error/314
**Category:** Uncategorized
**Created:** [October 29, 2024, 6:53am UTC](https://discourse.vfitoolkit.com/t/olg-transition-path-error/314 "2024-10-29T06:53:07Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Shiki](https://discourse.vfitoolkit.com/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@Shiki](https://discourse.vfitoolkit.com/u/Shiki)
#### Post date: [October 30, 2024, 9:01pm UTC](https://discourse.vfitoolkit.com/t/olg-transition-path-error/314/10 "2024-10-30T21:01:40Z")

</div>

Actually this afternoon I tried to incorporate transition path code to [Chen(2010) sample codes](https://github.com/robertdkirkby/Chen2010housing/blob/main/Chen2010.m), and get the same error. In the sample, n\_a=[301,35], but [TransitionPath\_Case1\_FHorz](https://github.com/vfitoolkit/VFIToolkit-matlab/blob/master/TransitionPaths/FHorz/TransitionPath_Case1_FHorz.m) 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.

---

_[View the full topic](https://discourse.vfitoolkit.com/t/olg-transition-path-error/314)._
