# ModelingToolkit example macro appears not to work

**URL:** <https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981>\
**Category:** Modelling & Simulations\
**Created:** [April 25, 2022, 10:40am UTC](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981 "2022-04-25T10:40:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kieran\_Marray](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kieran_marray/32/35686_2.png) [@Kieran\_Marray](https://discourse.julialang.org/u/Kieran_Marray)\
**Post date:** [April 25, 2022, 10:40am UTC](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981/1 "2022-04-25T10:40:49Z")

</div>

Hi!  
I am trying to set up an ODE System similar to the very first example in ModelingToolkit. When I try to run e.g the code from the first example I get the error `UndefVarError: @named not defined’.

Anyone know what is going on? Here is the code

```julia

using ModelingToolkit

@variables t x(t) RHS(t) # independent and dependent variables
@parameters τ # parameters
D = Differential(t) # define an operator for the differentiation w.r.t. time

# your first ODE, consisting of a single equation, indicated by ~
@named fol_separate = ODESystem([ RHS ~ (1 - x)/τ,
                                  D(x) ~ RHS ])
```

---

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [April 25, 2022, 12:20pm UTC](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981/2 "2022-04-25T12:20:18Z")

</div>

That code works for me. What version of `ModelingToolkit` are you running? Check with

```julia
] st ModelingToolkit

```

in the REPL, current version seems to be v8.7.1 and was the one I tested with.

---

<div class="post-metadata">

**Author:** ![Kieran\_Marray](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kieran_marray/32/35686_2.png) [@Kieran\_Marray](https://discourse.julialang.org/u/Kieran_Marray)\
**Post date:** [April 25, 2022, 1:38pm UTC](https://discourse.julialang.org/t/modelingtoolkit-example-macro-appears-not-to-work/79981/3 "2022-04-25T13:38:17Z")

</div>

Thank you for specifying the version - I manually upgraded to v8.7.1 and it now works
