using DifferentialEquations
f(u,p,t) = 1.01*u
u0 = 1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
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!")
This is a sample code from the DifferentialEquations.jl documentation and whenever I try to run this I get that UndefVarError: plot! not defined
A similar error arrises when just executing a simpler version
using DifferentialEquations
f(u,p,t) = 1.01*u
u0 = 1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
println(prob)
UndefVarError: ODEProblem not defined
I ran status and these are the current versions I am running Julia 1.5.1 (first install today) on Windows 10:
Atom v0.12.21
DifferentialEquations v6.15.0
IJulia v1.21.3
Juno v0.8.3