[R-sig-dyn-mod] Solving systems of differential equations in matrix form with deSolve

Nicola Gambaro n|co|@ @end|ng |rom g@mb@ro@co@uk
Tue Apr 12 17:04:58 CEST 2022


Dear all,

I have a model that is quite complicated to express as a list of single differential equations. It would be much easier to express it in matrix form, but I have not found an example of how deSolve can be used to do this.

Let us take as an example the simple linear system of ordinary differential equations

dY/dt = AY + F

where Y is the vector of the independent variables, A is the matrix of model parameters and F is the inhomogeneous part of the equations.

How do you go about using deSolve’s ode() function to solve this system?

Many thanks for your help in advance,
Nicola



More information about the R-sig-dynamic-models mailing list