# Why can't I use endogenous variables for calculations after the simulation?

**URL:** <https://forum.dynare.org/t/why-cant-i-use-endogenous-variables-for-calculations-after-the-simulation/25782>\
**Category:** Perfect foresight simulations\
**Created:** [20 May 2024 10:16 UTC](https://forum.dynare.org/t/why-cant-i-use-endogenous-variables-for-calculations-after-the-simulation/25782 "2024-05-20T10:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francisco\_Saraiva](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/73ab20/32.png) [@Francisco\_Saraiva](https://forum.dynare.org/u/Francisco_Saraiva)\
**Post date:** [20 May 2024 10:16 UTC](https://forum.dynare.org/t/why-cant-i-use-endogenous-variables-for-calculations-after-the-simulation/25782/1 "2024-05-20T10:16:42Z")

</div>

[EcAmbientalRegional09nov.mod](https://forum.dynare.org/uploads/short-url/xAY0vSVcBdA87yCitZUtdAX0HW0.mod) (5.1 KB)

I used to run perfect foresight simulation and mention simulated results for endogenous variables directly to compute welfare measures. I recently updated my Matlab to 2021a and dynare to 6.1 version. When I was trying to re-run previous routines that uses these welfare calculations I’m getting the error message

“Unrecognized function or variable ‘T’.”

I also noticed that vectors for each endogenous variables paths are not being created anymore (the reason for that error).  
The question is: How can I create an individual vectors for all endogenous variables? I know that I can use the declaration order and the results presented in oo\_-\>endo\_simul, but there is a way make calculations mentioning endogenous variables directly?

---

<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:** [20 May 2024 16:42 UTC](https://forum.dynare.org/t/why-cant-i-use-endogenous-variables-for-calculations-after-the-simulation/25782/2 "2024-05-20T16:42:03Z")

</div>

Use

```auto
send_endogenous_variables_to_workspace

```

See

> **[Breaking Features in Version 6 · Wiki · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/wikis/Breaking-Features-in-Version-6)**
>
> A platform for handling a wide class of economic models

---

<div class="post-metadata">

**Author:** ![Francisco\_Saraiva](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/73ab20/32.png) [@Francisco\_Saraiva](https://forum.dynare.org/u/Francisco_Saraiva)\
**Post date:** [20 May 2024 21:36 UTC](https://forum.dynare.org/t/why-cant-i-use-endogenous-variables-for-calculations-after-the-simulation/25782/3 "2024-05-20T21:36:45Z")

</div>

Thank you!
