Skip to content

Commit 901c1ea

Browse files
update documentation for variable dependencies
1 parent 6781381 commit 901c1ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ variables, and parameters. Therefore we label them as follows:
2828
using SciCompDSL
2929

3030
# Define some variables
31-
@DVar x y z
3231
@IVar t
32+
@DVar x(t) y(t) z(t)
3333
@Deriv D'~t
3434
@Param σ ρ β
3535
```
@@ -275,19 +275,19 @@ is accessible via a function-based interface. This means that all macros are
275275
syntactic sugar in some form. For example, the variable construction:
276276

277277
```julia
278-
@DVar x y z
279278
@IVar t
279+
@DVar x(t) y(t) z(t)
280280
@Deriv D'~t
281281
@Param σ ρ β
282282
```
283283

284284
is syntactic sugar for:
285285

286286
```julia
287-
x = DependentVariable(:x)
288-
y = DependentVariable(:y)
289-
z = DependentVariable(:z)
290287
t = IndependentVariable(:t)
288+
x = DependentVariable(:x,dependents = [t])
289+
y = DependentVariable(:y,dependents = [t])
290+
z = DependentVariable(:z,dependents = [t])
291291
D = Differential(t) # Default of first derivative, Derivative(t,1)
292292
σ = Parameter()
293293
ρ = Parameter()

0 commit comments

Comments
 (0)