rk_answers
Matlab:
-
expsin_deriv.m,
defines the right hand side of the EXPSIN ODE.
-
expsin_errors.m,
compares the approximation errors of rk1, rk2 and rk4
on the EXPSIN ODE.
-
expsin_rk1.m,
uses rk1 (Euler method) to approximately solve the EXPSIN ODE.
-
expsin_rk2.m,
uses rk2 to approximately solve the EXPSIN ODE.
-
expsin_solution.m,
defines the exact solution of the EXPSIN ODE.
-
predator_deriv.m,
a function which defines the derivatives associated with
the predator-prey ODE system.
-
predator_rk1.m,
a script to test the rk1 code with predator_deriv(),
producing a solution, phase, and conservation plots.
-
predator_rk2.m,
a script to test the rk2 code with predator_deriv(),
producing a solution, phase, and conservation plots.
-
predator_rk4.m,
a script to test the rk4 code with predator_deriv(),
producing a solution, phase, and conservation plots.
-
rk1.m,
a Runge-Kutta ODE solver of order 1
(this is just the Euler method).
-
rk2.m,
a Runge-Kutta ODE solver of order 2.
-
rk4.m,
a Runge-Kutta ODE solver of order 4.
-
rms.m,
evaluates the RMS norm of a vector.
Images:
Last revised on 15 September 2020.