diff --git a/docs/figs/ch4-01.jl b/docs/figs/ch4-01.jl index 06146eae..f2ef4be0 100644 --- a/docs/figs/ch4-01.jl +++ b/docs/figs/ch4-01.jl @@ -31,21 +31,21 @@ function ∂B41(u, p, t) end function model41!(D, u, p, t) - D.a = ∂A41(u, p, t) - D.b = ∂B41(u, p, t) + D[1] = ∂A41(u, p, t) + D[2] = ∂B41(u, p, t) return nothing end # ## Fig 4.2 A ps1 = (k1=20., k2=5., k3=5., k4=5., k5=2., n=4.) -u0s = [ +u0s = ( [0.0, 0.0], [0.5, 0.6], [0.17, 1.1], [0.25, 1.9], [1.85, 1.7], -] +) tend = 1.5 diff --git a/docs/figs/ch4-07.jl b/docs/figs/ch4-07.jl index c74c0e5d..f1918355 100644 --- a/docs/figs/ch4-07.jl +++ b/docs/figs/ch4-07.jl @@ -26,8 +26,8 @@ function ∂B47(u, p, t) end function model47!(D, u, p, t) - D.a = ∂A47(u, p, t) - D.b = ∂B47(u, p, t) + D[1] = ∂A47(u, p, t) + D[2] = ∂B47(u, p, t) return nothing end diff --git a/docs/figs/ch4-15.jl b/docs/figs/ch4-15.jl index a7fda06f..08d0748a 100644 --- a/docs/figs/ch4-15.jl +++ b/docs/figs/ch4-15.jl @@ -28,8 +28,8 @@ function dB415(u, p, t) end function model415!(D, u, p, t) - D.a = dA415(u, p, t) - D.b = dB415(u, p, t) + D[1] = dA415(u, p, t) + D[2] = dB415(u, p, t) return nothing end diff --git a/docs/figs/ch5-10.jl b/docs/figs/ch5-10.jl index 0fc5c531..38e2bac9 100644 --- a/docs/figs/ch5-10.jl +++ b/docs/figs/ch5-10.jl @@ -57,12 +57,12 @@ ps = ( ) tend = 5. -u0 = [AdoMet=10., AdoHcy=10.] +u0 = [10., 10.] prob = ODEProblem(metmodel!, u0, tend, ps) sol = solve(prob) -fig = plot(sol, title="Figure 5.10", xlabel="Time (hr)", ylabel="Concentration (μM)", xlims=(0, 1), legend=:right) +fig = plot(sol, title="Figure 5.10", xlabel="Time (hr)", ylabel="Concentration (μM)", xlims=(0, 1), legend=:right, label=["AdoMet" "AdoHcy"]) fig |> PNG