# The use of a model variable in an m-file

**URL:** <https://forum.dynare.org/t/the-use-of-a-model-variable-in-an-m-file/11800>\
**Category:** Optimal Policy\
**Created:** [7 May 2018 17:43 UTC](https://forum.dynare.org/t/the-use-of-a-model-variable-in-an-m-file/11800 "2018-05-07T17:43:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [18 October 2018 09:40 UTC](https://forum.dynare.org/t/the-use-of-a-model-variable-in-an-m-file/11800/4 "2018-10-18T09:40:31Z")

</div>

Search the forum. There are various posts on this, e.g.

> [@Loop over parameters to find maximized welfare](https://forum.dynare.org/t/loop-over-parameters-to-find-maximized-welfare/12358):
>
> Dear all, here are so many similar questions on this forum, but I couldn’t find out an identical question here, I really need a help frowning I have found two topic related to my question: and My questions are as below. First of all, what is the difference between these two topics? which one could loop over parameters to find out the corresponding maximized welfare? // Next, follow the suggestion from the first forum topic, I build a .m file to find out my target welfare. dynare…

---

_[View the full topic](https://forum.dynare.org/t/the-use-of-a-model-variable-in-an-m-file/11800)._
