I'm trying to solve typical example from the DifferentialEquation package, according to the guide from their page.
Here is the example:
using DifferentialEquations
using Plots
function lorenz(t,u, du)
du[1] = 10.0(u[2]-u[1])
du[2] = u[1]*(28.0-u[3]) - u[2]
du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(lorenz,u0,tspan)
sol = solve(prob)
plot(sol,vars=(1,2,3))
Then I get:
ERROR: LoadError: Parameters were indexed but the parameters are
nothing. You likely forgot to pass in parameters to the DEProblem!
What is wrong here? Thanks in advance!