# Error using resol Too many output arguments

**URL:** <https://forum.dynare.org/t/error-using-resol-too-many-output-arguments/28319>\
**Category:** Estimation\
**Created:** [25 March 2026 14:42 UTC](https://forum.dynare.org/t/error-using-resol-too-many-output-arguments/28319 "2026-03-25T14:42:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zulen](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/85f322/32.png) [@Zulen](https://forum.dynare.org/u/Zulen)\
**Post date:** [25 March 2026 14:42 UTC](https://forum.dynare.org/t/error-using-resol-too-many-output-arguments/28319/1 "2026-03-25T14:42:34Z")

</div>

Hello professor. I was trying to run a dynare code to calculate best parameters based on a welfare rule. However there’s a problem with my code, especially function welfare\_objective which has an error with resol, probably because the code was created for dynare 4. or 5.. Currently im using dynare 6.5. I’m attaching my code for help. In main im running the main simulation, while nk\_wr is the model, and the rest are the files that contain different functions.

[welfare\_objective (1).m](https://forum.dynare.org/uploads/short-url/qM78lZVpeGWQfvvXeHwjO3U7J7J.m) (1.1 KB)

[rmain\_.m](https://forum.dynare.org/uploads/short-url/fPzQB4YCaJN2l8o6eiYjO1t2iLD.m) (3.2 KB)

[nk\_wr.mod](https://forum.dynare.org/uploads/short-url/fvW5f8881DR8biLh7ADNizekw2v.mod) (35.4 KB)

[get\_consumption\_equivalent\_unconditional\_welfare.m](https://forum.dynare.org/uploads/short-url/ztpjy1pR2t1E2EMjHZO4WabcyWh.m) (2.3 KB)

[get\_consumption\_equivalent\_conditional\_welfare.m](https://forum.dynare.org/uploads/short-url/6ZfvAs0zVgPfU0EpowWZfJT4jDm.m) (2.4 KB)

---

<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:** [25 March 2026 15:47 UTC](https://forum.dynare.org/t/error-using-resol-too-many-output-arguments/28319/2 "2026-03-25T15:47:00Z")

</div>

You can base the update on what was implemented in e.g. [Born\_Pfeifer\_2018\_welfare.mod: remove global variables and prepare fo… · JohannesPfeifer/DSGE\_mod@05a8f0a · GitHub](https://github.com/JohannesPfeifer/DSGE_mod/commit/05a8f0aac524434f4e83aaeeed3460a6fabc1bb3)
