Skip to content

Commit 44d539b

Browse files
committed
up
1 parent e968c93 commit 44d539b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/faqs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ sol = solve(oprob, Tsit5())
3434
Suppose we want to plot just species `C`, without having to know its integer
3535
index in the unknown vector. We can do this using the symbolic variable `C`, which
3636
we can get at in several ways
37-
```julia
37+
```@example faq1
3838
sol[osys.C]
3939
```
4040
or
41-
```julia
41+
```@example faq1
4242
@unpack C = osys
4343
sol[C]
4444
```
4545
To evaluate `C` at specific times and plot it we can just do
46-
```julia
46+
```@example faq1
4747
t = range(0.0, 10.0, length=101)
4848
plot(t, sol(t, idxs = C), label = "C(t)", xlabel = "t")
4949
```
5050
If we want to get multiple variables we can just do
51-
```julia
51+
```@example faq1
5252
@unpack A, B = osys
5353
sol(t, idxs = [A, B])
5454
```
5555
Plotting multiple variables using the SciML plot recipe can be achieved
5656
like
57-
```julia
57+
```@example faq1
5858
plot(sol; idxs = [A, B])
5959
```
6060

0 commit comments

Comments
 (0)