Runge-Kutta method: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Sidef}}: Fix link: Perl 6 --> Rakua) |
|||
Line 1,600: | Line 1,600: | ||
{{trans|Python}} |
{{trans|Python}} |
||
<lang julia>function rk4(f::Function, x₀::Float64, y₀::Float64, x₁::Float64, n) |
<lang julia>function rk4(f::Function, x₀::Float64, y₀::Float64, x₁::Float64, n) |
||
vx = Vector{Float64}(n + 1) |
vx = Vector{Float64}(undef, n + 1) |
||
vy = Vector{Float64}(n + 1) |
vy = Vector{Float64}(undef, n + 1) |
||
vx[1] = x = x₀ |
vx[1] = x = x₀ |
||
vy[1] = y = y₀ |
vy[1] = y = y₀ |