File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22Documenter = " e30172f5-a6a5-5a46-863b-614d45cd2de4"
33ModelingToolkit = " 961ee093-0014-501f-94e3-6117800e7a78"
44OrdinaryDiffEq = " 1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
5+ Plots = " 91a5bcdd-55d7-5caf-9e0b-520d859cae80"
56SymbolicIndexingInterface = " 2efcf032-c050-4f8e-a9bb-153293bab1f5"
67
78[compat ]
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ This tutorial will cover ways to use the interface for types that implement it.
44Consider 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)
4646```
4747
4848This 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
5151sol[[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
6767sol(1.3, idxs=[:y, :z])
6868```
6969
70+ ``` @example Usage
71+ plot(sol, idxs=x)
72+ ```
73+
7074If necessary, ` Symbol ` s can be used to refer to variables. This is only valid for
7175symbolic variables for which [ ` hasname ` ] ( @ref ) returns ` true ` . The ` Symbol ` used must
7276match the one returned by [ ` getname ` ] ( @ref ) for the variable.
You can’t perform that action at this time.
0 commit comments