# Matlab2016b crashes when stochsimul (order=3) is run

**URL:** <https://forum.dynare.org/t/matlab2016b-crashes-when-stochsimul-order-3-is-run/10857>\
**Category:** Installation and Setup\
**Created:** [11 October 2017 06:27 UTC](https://forum.dynare.org/t/matlab2016b-crashes-when-stochsimul-order-3-is-run/10857 "2017-10-11T06:27:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pb2415](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/6f9a4e/32.png) [@pb2415](https://forum.dynare.org/u/pb2415)\
**Post date:** [11 October 2017 06:27 UTC](https://forum.dynare.org/t/matlab2016b-crashes-when-stochsimul-order-3-is-run/10857/1 "2017-10-11T06:27:46Z")

</div>

I am using dynare 4.5.1 and stoch simul, order =3 with pruning makes matlab crash. Matlab just closes down. What is wrong? It used to work before with older version of dynare.

---

<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:** [11 October 2017 07:28 UTC](https://forum.dynare.org/t/matlab2016b-crashes-when-stochsimul-order-3-is-run/10857/2 "2017-10-11T07:28:09Z")

</div>

This is a known bug with Windows 7. See [https://github.com/DynareTeam/dynare/wiki/KnownBugs](https://github.com/DynareTeam/dynare/wiki/KnownBugs)

> The k\_order\_perturbation mex-file sometimes causes crashes on Windows 7 systems. A workaround consists of replacing the mex-files by the ones from version 4.4.3

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [19 October 2017 11:58 UTC](https://forum.dynare.org/t/matlab2016b-crashes-when-stochsimul-order-3-is-run/10857/3 "2017-10-19T11:58:09Z")

</div>

This should be fixed it last release (4.5.2).

Best,  
Stéphane
