# OccBin\_Error using \_\* Inner matrix dimensions must agree

**URL:** <https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342>\
**Category:** Dynare contributions and examples\
**Created:** [18 June 2021 08:53 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342 "2021-06-18T08:53:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [18 June 2021 08:53 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/1 "2021-06-18T08:53:27Z")

</div>

Using 64-bit preprocessor  
Starting Dynare (version 4.5.1).  
Starting preprocessing of the model file …  
Found 57 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1
- order 2  
Processing outputs …  
done  
Preprocessing completed.

Total computing time : 0h00m00s

> Error using \*  
> Inner matrix dimensions must agree.
> 
> Error in solve\_one\_constraint (line 154)  
> relaxconstraint\_ = eval(constraint\_relax\_difference\_);
> 
> Error in runsim\_borrcon\_Amy (line 32)  
> [zdatalinear zdatapiecewise zdatass oobase\_ Mbase\_] = …

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [18 June 2021 08:55 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/2 "2021-06-18T08:55:54Z")

</div>

when I use OccBin to solve my model, which involves borrowing constraints similar to JME 2017, collateral constraints and macroeconomic asymmetrics, I met such an error.

Does that mean that there is sth wrong with my setting of “constraint=” or “constraintr\_relax=”?

What can I do to fix it? (I use the toolkit\_files\_4.5., in the forum).

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [18 June 2021 10:36 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/3 "2021-06-18T10:36:05Z")

</div>

Does anyone have any advice on how to fix? Please do help!

Thanks!

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [18 June 2021 11:17 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/4 "2021-06-18T11:17:09Z")

</div>

```auto
Cell contents reference from a non-cell array object.

Error in solve_one_constraint (line 44)
  eval([Mbase_.param_names{i_indx_,:},'= M_.params(i_indx_);']);

Error in runsim_borrcon_Amy (line 32)
[zdatalinear zdatapiecewise zdatass oobase_ Mbase_] = ...
 

```

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [19 June 2021 09:50 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/5 "2021-06-19T09:50:13Z")

</div>

Without the files, it is impossible to tell. Note that a 4.6-compatible version of Occbin is at [GitHub - JohannesPfeifer/Occbin\_update](https://github.com/JohannesPfeifer/Occbin_update)

---

<div class="post-metadata">

**Author:** ![Avery66676](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@Avery66676](https://forum.dynare.org/u/Avery66676)\
**Post date:** [24 June 2022 22:10 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/6 "2022-06-24T22:10:06Z")

</div>

Hi,

May I ask if you have solved your problem. I also have a problem with this toolkit, but my problem is on steady state as follow

Unrecognized field name “ys”.  
Error in solve\_one\_constraint (line 49)  
eval([Mbase\_.endo\_names{i,:} '_ss = oobase_.dr.ys(i); ']);

Do you have any ideas about this problem? Thank you

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [26 June 2022 07:58 UTC](https://forum.dynare.org/t/occbin-error-using-inner-matrix-dimensions-must-agree/18342/7 "2022-06-26T07:58:20Z")

</div>

Please do not doube-post. See the reply at

> [@Problem with OCCBIN](https://forum.dynare.org/t/problem-with-occbin/19727/10):
>
> Given that we now ship OccBin with Dynare 5, please try that one.
