# Loop over arguments while running dynare in matlab

**URL:** <https://forum.dynare.org/t/loop-over-arguments-while-running-dynare-in-matlab/22636>\
**Category:** Macro-language\
**Created:** [22 June 2023 08:11 UTC](https://forum.dynare.org/t/loop-over-arguments-while-running-dynare-in-matlab/22636 "2023-06-22T08:11:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [22 June 2023 14:17 UTC](https://forum.dynare.org/t/loop-over-arguments-while-running-dynare-in-matlab/22636/2 "2023-06-22T14:17:20Z")

</div>

Have a look at

> [@Pass a matlab string to a MACRO\_VARIABLE](https://forum.dynare.org/t/pass-a-matlab-string-to-a-macro-variable/22320/4):
>
> That’s because the command line treats xy as a string. Use xy =pwd eval(['dynare mainfile -Dpath="' xy '"']) to construct the proper string substitutions.

---

_[View the full topic](https://forum.dynare.org/t/loop-over-arguments-while-running-dynare-in-matlab/22636)._
