1
+ using Random
2
+
1
3
"""
2
4
```julia
3
5
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];
2419
2421
"""
2420
2422
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 )
2421
2423
ps = [a, b, c, d, e, f]
2422
- return CoupledODEs (three_scroll_f , u0, ps)
2424
+ return CoupledODEs (three_scroll_rule , u0, ps)
2423
2425
end
2424
2426
2425
- @inbounds function three_scroll_f (u, p, t)
2427
+ @inbounds function three_scroll_rule (u, p, t)
2426
2428
a, b, c, d, e, f = p
2427
2429
x, y, z = u
2428
2430
dx = a* (y - x) + d* x* z
@@ -2433,7 +2435,7 @@ end
2433
2435
2434
2436
"""
2435
2437
```julia
2436
- function henon_heiles(u0 = ones(1,4); λ = 1.)
2438
+ function henon_heiles(u0 = ones(1,4); λ = 1.0 )
2437
2439
```
2438
2440
```math
2439
2441
\\ begin{aligned}
@@ -2443,11 +2445,10 @@ function henon_heiles(u0 = ones(1,4); λ = 1.)
2443
2445
\\ dot{dp_y} &= -y - λ\\\\
2444
2446
\\ end{aligned}
2445
2447
```
2446
- Non-linear motion of a star around a galatic center.
2448
+ Non-linear motion of a star around a galatic center.
2447
2449
"""
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. )
2449
2451
Random. seed! (1 )
2450
- u0 = 0.2 * rand (1 ,4 ) .- 0.1 * u0
2451
2452
ps = [λ]
2452
2453
return CoupledODEs (henon_heiles_rule, u0, ps)
2453
2454
end
0 commit comments