# Re-computing the steady state from external file

**URL:** <https://forum.dynare.org/t/re-computing-the-steady-state-from-external-file/16543>\
**Category:** Steady state\
**Created:** [3 September 2020 17:05 UTC](https://forum.dynare.org/t/re-computing-the-steady-state-from-external-file/16543 "2020-09-03T17:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chicoutimy](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@chicoutimy](https://forum.dynare.org/u/chicoutimy)\
**Post date:** [3 September 2020 17:05 UTC](https://forum.dynare.org/t/re-computing-the-steady-state-from-external-file/16543/1 "2020-09-03T17:05:04Z")

</div>

Hi,  
I used to run these commands to compute the steady state from another Matlab script:

% Simulate Dynare once  
dynare gm331.mod

% Change parameter value  
M\_.params(strmatch(‘phi\_p’,M\_.param\_names,‘exact’)) = 0.2;

% Recompute the steady state with the new parameter value  
oo\_.dr.ys = gm331\_steadystate;

Now with Dynare 4.6.1 the last command leads to error: “Not enough input arguments”. I understand the new version has changed the inputs in the steady state computation file, but I can’t find the proper syntax for this command. Could anyone help?

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [4 September 2020 06:21 UTC](https://forum.dynare.org/t/re-computing-the-steady-state-from-external-file/16543/2 "2020-09-04T06:21:41Z")

</div>

Hi chicoutimy,

Since release 4.6.0, the function declaration has been changed to reflect the move of some structures like `M_` from global variables into function inputs

Dynare 4.6.0:

```auto
function [ys,params,check] = NK_baseline_steadystate(ys,exo,M_,options_)

```

Previous releases:

```auto
function [ys,check] = NK_baseline_steadystate(ys,exo)

```

See

> [@Code not working after updating Dynare to 4.6.0](https://forum.dynare.org/t/code-not-working-after-updating-dynare-to-4-6-0/15254/5):
>
> M\_ is not global anymore, but it is a function input. So outside of the header, nothing changes. Of course, if M\_ was used as a global variable in the function to be solved, then you need to adjust that function as well to accept M\_ as an input.

---

<div class="post-metadata">

**Author:** ![chicoutimy](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@chicoutimy](https://forum.dynare.org/u/chicoutimy)\
**Post date:** [4 September 2020 13:30 UTC](https://forum.dynare.org/t/re-computing-the-steady-state-from-external-file/16543/3 "2020-09-04T13:30:40Z")

</div>

Hi cmarch,

Thanks for your answer. I think I found the solution to my problem. To compute the steady state from an external file (not to solve the steady state by invoking Dynare), one used to use:

oo\_.dr.ys = gm331\_steadystate;

Now, with the new version, one should define:

exo = zeros(M\_.exo\_nbr,1); ys = zeros(M\_.endo\_nbr,1);

Then use:

oo\_.dr.ys = gm331\_steadystate(ys,exo,M\_,options\_);

Cheers
