multirunge: Runge-Kutta numerical solver (single point, multivariate)

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/multirunge.R

Description

Solves numerically an initial conditions problem for a set of Ordinary Differential Equations (ODE) by Runge-Kutta 4 method. Integrates numerically the equations from tmin to tmax by steps of dt.

Usage

1
multirunge(y0, tmin, tmax, dt, param, sys)

Arguments

y0

Numerical vector : initial conditions (as many elements as equations in sys)

tmin

Minimum value of the independent variable (generally the time)

tmax

Maximum value of the independent variable

dt

Time increment (default = 0.01)

param

Numerical vector providing the parameters for sys

sys

The set of functions giving the right sides of the ODEs

Details

sys must be provided by the user. Please edit the object sys (see ?sys and examples)

Value

A numerical vector of nfunct elements. Nfunct is the number of unknown functions of sys determined by the function as length(sys())

Note

Should seldom be used independently. Most often it will be called by evrunge

Author(s)

Jean-Sebastien Pierre
[email protected]

See Also

evrunge, sys, nls

Examples

1
 multirunge(y0=c(1000,0),tmin=0,tmax=30,dt=0.01,param=c(1,1),sys=sys)

nlsrk documentation built on June 24, 2017, 1:02 a.m.