Click or drag to resize

RungeKutta45OdeSolverSolve(FuncDouble, DoubleVector, DoubleVector, DoubleVector, DoubleVector, RungeKutta45OdeSolverOptions) Method

Solves initial value problem of ordinary differential equations. This function solves of equations of the form y' = f(t,y). If the equations involve a mass matrix, either constant of time and state dependent, it must be specified using the solverOptions parameter. The mass matrix must be nonsigular.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
public RungeKutta45OdeSolverSolution<DoubleMatrix> Solve(
	Func<double, DoubleVector, DoubleVector> odeFunction,
	DoubleVector timeSpan,
	DoubleVector y0,
	RungeKutta45OdeSolverOptions solverOptions


odeFunction  FuncDouble, DoubleVector, DoubleVector
A delegate which evaluates the right hand side of the differential equations.
timeSpan  DoubleVector
A vector specifying the interval if integration [t0, tf].
y0  DoubleVector
Initial value for problem. It is the value of the unknown function y at the initial time value timeSpan[0].
solverOptions  RungeKutta45OdeSolverOptions
Solver options.

Return Value

The solution as a key-value pair. The Key value is a vector of time values, and the Value is a matrix of state values. The ith row of the Value matrix is the state vector corresponding to the ith time value in the Key vector.
See Also