diff --git a/Project.toml b/Project.toml index 8049472..8603ce9 100644 --- a/Project.toml +++ b/Project.toml @@ -13,12 +13,12 @@ Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] -ControlSystemIdentification = "2.2.4" -ControlSystems = "0.11, 0.12" +ControlSystemIdentification = "2.9" +ControlSystems = "1.10" ForwardDiff = "0.10" -FractionalDiffEq = "0.2" -Roots = "1.3.14, 2" -SpecialFunctions = "2" +FractionalDiffEq = "0.3.1" +Roots = "2" +SpecialFunctions = "2.3" julia = "1.6" [extras] diff --git a/examples/RFLE.jl b/examples/RFLE.jl index 2b36ba8..e60874b 100644 --- a/examples/RFLE.jl +++ b/examples/RFLE.jl @@ -1,4 +1,4 @@ -using FractionalSystems, Plots +using FractionalDiffEq, Plots function RF(du, u, p, t) du[1] = u[2]*(u[3]-1+u[1]*u[1])+0.1*u[1] @@ -10,4 +10,9 @@ LE, tspan=FOLyapunov(RF, 0.999, 0, 0.02, 300, [0.1; 0.1; 0.1], 0.005, 1000) plot(tspan, LE[1, :]) plot!(tspan, LE[2, :]) -plot!(tspan, LE[3, :]) \ No newline at end of file +plot!(tspan, LE[3, :]) + +# Or we can compute the Lyapunov exponents with FractionalDiffEq.jl +using FractionalDiffEq +sys=FODESystem(RF, [0.999, 0.999, 0.999], [0.1; 0.1; 0.1], (0, 300)) +LE, tspan = FOLyapunov(sys, 0.02, 0.005, 1000) diff --git a/src/FOLE.jl b/src/FOLE.jl index 41f92a1..78bfce5 100644 --- a/src/FOLE.jl +++ b/src/FOLE.jl @@ -104,7 +104,7 @@ function FOLyapunov(fun, order, t_start, h_norm, t_end, u0, h, out)# TODO: Gener return LE, tspan end -FOLyapunov(sys::FODESystem, h_norm, h, out) = FOLyapunov(sys.f, sys.α, tspan[1], h_norm, tspan[2], sys.x0, h, out) +#FOLyapunov(sys::FODESystem, h_norm, h, out) = FOLyapunov(sys.f, sys.α, sys.tspan[1], h_norm, sys.tspan[2], sys.u0, h, out) mutable struct M an diff --git a/src/fotf/show.jl b/src/fotf/show.jl index 26d08e0..e73c68f 100644 --- a/src/fotf/show.jl +++ b/src/fotf/show.jl @@ -28,7 +28,7 @@ function polyshow(p, np) P = "" p = p[ii] - for i = 1:length(p) + for i in eachindex(p) P = P*"+"*"$(p[i])"*"s^"*"{$(np[i])}" end