Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Dec 29, 2023
1 parent 3dc2496 commit 2db4aea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/figs/ch4-07.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fig |> PNG
Symmetric parameter set
===#

ps2 = LVector(k1=20., k2=20., k3=5., k4=5., n1=4., n2=4.)
ps2 = (k1=20., k2=20., k3=5., k4=5., n1=4., n2=4.)

tend = 4.0
sol1 = solve(ODEProblem(model47!, [3., 1.], tend, ps2))
Expand Down Expand Up @@ -154,7 +154,7 @@ nca47(b, p) = p.k1 / p.k3 * hil(1, b, p.n1)
ncb47(a, p) = p.k2 / p.k4 * hil(1, a, p.n2)

pls = map((8.0, 16.0, 20.0, 35.0)) do k1
ps = LVector(k1=k1, k2=20., k3=5., k4=5., n1=4., n2=4.)
ps = (k1=k1, k2=20., k3=5., k4=5., n1=4., n2=4.)
pl = plot(b -> nca47(b, ps), identity, 0., 7., label="Nullcline A")
plot!(pl, identity, a -> ncb47(a, ps), 0., 7., label="Nullcline B")
plot!(pl, title = "K1 = $k1", xlim=(0., 7.), ylim=(0., 7.), aspect_ratio = :equal, xlabel="[A]", ylabel="[B]")
Expand Down
6 changes: 3 additions & 3 deletions docs/figs/ch4-18.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ hil(x, k, n) = hil(x^n, k^n)
function model418!(D, u, p, t)
a, b = u
k1, k2, k3, k4, k5, n = p
D.a = k1 * hil(1, b, n) - (k3 + k5) * a
D.b = k2 + k5 * a - k4 * b
D[1] = k1 * hil(1, b, n) - (k3 + k5) * a
D[2] = k2 + k5 * a - k4 * b
end

function ainf(k1)
ps = (k1 = k1, k2 = 5., k3 = 5., k4 = 5., k5 = 2., n = 4.)
u0 = [0., 0.]
prob = SteadyStateProblem(model418!, u0, ps)
sol = solve(prob, DynamicSS(Rodas5()))
return sol.u.a
return sol.u[1]
end

#---
Expand Down

0 comments on commit 2db4aea

Please sign in to comment.