Learn R Programming

facilitation (version 0.5.2)

solution.matrix: solution.matrix

Description

The solution.matrix function returns the solution to a linear ODE of the form P' = MP, which is merely P(t) = exp(Mt)p0 where p0 is the initial condition

Usage

solution.matrix(p0, M, times = c(1:10))

Arguments

p0

initial condition, as an array

M

a square matrix with as many rows as P0

times

an array containing the times in which to calculate the solution

Examples

Run this code
# NOT RUN {
mat <- mat.model.base(5)
solution.matrix(c(1,0,0,0,0),mat)
# }

Run the code above in your browser using DataLab