Skip to content

Commit 780861c

Browse files
committed
import t and D
1 parent 9aad027 commit 780861c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/src/tutorials/SampledData.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ y(k) = x(k)
3030
```
3131

3232
```@example clocks
33-
@variables t x(t) y(t) u(t)
33+
using ModelingToolkit
34+
using ModelingToolkit: t_nounits as t
35+
@variables x(t) y(t) u(t)
3436
dt = 0.1 # Sample interval
3537
clock = Clock(t, dt) # A periodic clock with tick rate dt
3638
k = ShiftIndex(clock)
@@ -142,8 +144,10 @@ Below, we model a simple continuous first-order system called `plant` that is co
142144

143145
```@example clocks
144146
using ModelingToolkit, Plots, OrdinaryDiffEq
147+
using ModelingToolkit: t_nounits as t
148+
using ModelingToolkit: D_nounits as D
145149
dt = 0.5 # Sample interval
146-
@variables t r(t)
150+
@variables r(t)
147151
clock = Clock(t, dt)
148152
k = ShiftIndex(clock)
149153

0 commit comments

Comments
 (0)