Skip to content

Commit b80d622

Browse files
committed
Added more systems, standardized LaTeX formatting
1 parent 167df67 commit b80d622

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/continuous_famous_systems.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Random
2+
13
"""
24
```julia
35
lorenz(u0 = [0.0, 10.0, 0.0]; σ = 10.0, ρ = 28.0, β = 8/3)
@@ -2419,10 +2421,10 @@ function three_scroll(u0 = [-0.29, -0.25, -0.59];
24192421
"""
24202422
function three_scroll(u0 = [-0.29, -0.25, -0.59]; a = 32.48, b = 45.84, c = 1.18, d = 0.13, e = 0.57, f = 14.7)
24212423
ps = [a, b, c, d, e, f]
2422-
return CoupledODEs(three_scroll_f, u0, ps)
2424+
return CoupledODEs(three_scroll_rule, u0, ps)
24232425
end
24242426

2425-
@inbounds function three_scroll_f(u, p, t)
2427+
@inbounds function three_scroll_rule(u, p, t)
24262428
a, b, c, d, e, f = p
24272429
x, y, z = u
24282430
dx = a*(y - x) + d*x*z
@@ -2433,7 +2435,7 @@ end
24332435

24342436
"""
24352437
```julia
2436-
function henon_heiles(u0 = ones(1,4); λ = 1.)
2438+
function henon_heiles(u0 = ones(1,4); λ = 1.0)
24372439
```
24382440
```math
24392441
\\begin{aligned}
@@ -2443,11 +2445,10 @@ function henon_heiles(u0 = ones(1,4); λ = 1.)
24432445
\\dot{dp_y} &= -y - λ\\\\
24442446
\\end{aligned}
24452447
```
2446-
Non-linear motion of a star around a galatic center.
2448+
Non-linear motion of a star around a galatic center.
24472449
"""
2448-
function henon_heiles(u0 = ones(1,4); λ = 1.)
2450+
function henon_heiles(u0 = 0.2*rand(1,4) .- 0.1*ones(1,4); λ = 1.)
24492451
Random.seed!(1)
2450-
u0 = 0.2*rand(1,4) .- 0.1*u0
24512452
ps = [λ]
24522453
return CoupledODEs(henon_heiles_rule, u0, ps)
24532454
end

test/constructors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ end
7979
:rabinovich_fabrikant,
8080
:duffing,
8181
:fitzhugh_nagumo,
82-
:aizawa,
82+
:langford,
8383
:three_scroll,
8484
:henon_heiles,
8585
:dadras,

0 commit comments

Comments
 (0)