Skip to content

Commit ae50f9d

Browse files
fixup! refactor: add new *_symbols methods, corresponding singletons, update tests
1 parent 492fb01 commit ae50f9d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
44
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
5+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
56
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
67

78
[compat]

docs/src/usage.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tutorial will cover ways to use the interface for types that implement it.
44
Consider the following example:
55

66
```@example Usage
7-
using ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface
7+
using ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface, Plots
88
99
@parameters σ ρ β
1010
@variables t x(t) y(t) z(t) w(t)
@@ -46,7 +46,7 @@ sol[x]
4646
```
4747

4848
This also works for arrays or tuples of variables, including observed quantities and
49-
independent variables, and for interpolating solutions:
49+
independent variables, for interpolating solutions, and plotting:
5050
```@example Usage
5151
sol[[x, y]]
5252
```
@@ -60,13 +60,17 @@ sol(1.3, idxs=x)
6060
```
6161

6262
```@example Usage
63-
sol(1.3, idxs=[x, w]) # cannot use tuples of variables for interpolation
63+
sol(1.3, idxs=[x, w])
6464
```
6565

6666
```@example Usage
6767
sol(1.3, idxs=[:y, :z])
6868
```
6969

70+
```@example Usage
71+
plot(sol, idxs=x)
72+
```
73+
7074
If necessary, `Symbol`s can be used to refer to variables. This is only valid for
7175
symbolic variables for which [`hasname`](@ref) returns `true`. The `Symbol` used must
7276
match the one returned by [`getname`](@ref) for the variable.

0 commit comments

Comments
 (0)