mosaic (version 0.14.4)

rkintegrate: A simple Runge-Kutte integrator

Description

Integrates ordinary differential equations using a Runge-Kutta method

Usage

rkintegrate(fun, x0, tstart = 0, tend = 1, dt = NULL)

Arguments

fun

the dynamical function with arguments state (a vector) and t.

x0

the initial condition, a vector with one element for each state variable

tstart

starting time

tend

ending time for integration

dt

step size for integration

Value

a list containing x, a matrix of the state with one row for each time step and a vector t containing the times of those steps.

Details

This is mainly for internal use by integrateODE.