Skip to content

Commit

Permalink
update ode tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jun 26, 2017
1 parent 72f8fc7 commit 1173cb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified docs/src/assets/ode_tutorial_thick_linear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/src/tutorials/ode_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8)
using Plots
plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line",
xaxis="Time (t)",yaxis="u(t) (in μm)",label="My Thick Line!") # legend=false
plot!(sol.t, t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!")
```

where the pieces are described below.
Expand Down Expand Up @@ -233,6 +234,12 @@ plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line",
xaxis="Time (t)",yaxis="u(t) (in μm)",label="My Thick Line!") # legend=false
```

We can then add to the plot using the `plot!` command:

```julia
plot!(sol.t,t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!")
```

![ode_tutorial_thick_linear](../assets/ode_tutorial_thick_linear.png)

## Example 2: Solving Systems of Equations
Expand Down

0 comments on commit 1173cb9

Please sign in to comment.