# Looping over initial values - guide/example code

**URL:** https://forum.dynare.org/t/looping-over-initial-values-guide-example-code/13244
**Category:** Steady state
**Created:** [12 February 2019 14:30 UTC](https://forum.dynare.org/t/looping-over-initial-values-guide-example-code/13244 "2019-02-12T14:30:34Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![CZJAN](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/a88e4f/32.png) [@CZJAN](https://forum.dynare.org/u/CZJAN)
#### Post date: [12 February 2019 21:15 UTC](https://forum.dynare.org/t/looping-over-initial-values-guide-example-code/13244/3 "2019-02-12T21:15:38Z")

</div>

Dear professor Pfeifer,

thank you very much for your advice, my supervisor also suggested this approach, but I am not really sure, if this will work, so I plan to build steady state block with as much analytical symplifications as I would be able to derive, but I need to prepare such a “last resort” mechanism to be as sure, as possible, that I will be able to find steady state.

Is there some way, how to program this loop in dynare .mod file, or using looping over dynare file in Matlab? I saw some [codes](https://forum.dynare.org/t/loop-over-parameters/3335/2) for looping over parameters, so I want to ask, if there is something like set\_param\_value() function for initial values. I will use this brute force option just once, to find best starting guess for further aplications, so runtime is not so much constraint for me, I just want to be really sure, that solver will converge.

Thank you in advance.

Jan Žemlička

---

_[View the full topic](https://forum.dynare.org/t/looping-over-initial-values-guide-example-code/13244)._
