Skip to content

Commit 78f44ea

Browse files
committed
up
1 parent d8028aa commit 78f44ea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/src/faqs.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ observed(osys)
2626
Let's solve the system and see how to index the solution using our symbolic
2727
variables
2828
```@example faq1
29-
u0 = [rn.A => 1.0, rn.B => 2.0, rn.C => 0.0]
30-
ps = [rn.k₊ => 1.0, rn.k₋ => 1.0]
29+
u0 = [osys.A => 1.0, osys.B => 2.0, osys.C => 0.0]
30+
ps = [osys.k₊ => 1.0, osys.k₋ => 1.0]
3131
oprob = ODEProblem(osys, u0, (0.0, 10.0), ps)
3232
sol = solve(oprob, Tsit5())
3333
```
@@ -44,8 +44,8 @@ sol[C]
4444
```
4545
To evaluate `C` at specific times and plot it we can just do
4646
```@example faq1
47-
t = range(0.0, 10.0, length=101)
48-
plot(t, sol(t, idxs = C), label = "C(t)", xlabel = "t")
47+
t = range(0.0, 10.0, length = 101)
48+
plot(sol(t, idxs = C), label = "C(t)", xlabel = "t")
4949
```
5050
If we want to get multiple variables we can just do
5151
```@example faq1
@@ -87,6 +87,7 @@ rx1 = Reaction(k,[B,C],[B,D], [2.5,1],[3.5, 2.5])
8787
rx2 = Reaction(2*k, [B], [D], [1], [2.5])
8888
rx3 = Reaction(2*k, [B], [D], [2.5], [2])
8989
@named mixedsys = ReactionSystem([rx1, rx2, rx3], t, [A, B, C, D], [k, b])
90+
mixedsys = complete(mixedsys)
9091
osys = convert(ODESystem, mixedsys; combinatoric_ratelaws = false)
9192
osys = complete(osys)
9293
```

0 commit comments

Comments
 (0)