demo/expm_check.r

library(rexpokit, quietly=TRUE)
require(Matrix)

set.seed(1234)

n <- 5
x <- matrix(rnorm(n*n), nrow=n, ncol=n)

A <- rexpokit::expm(x, t=1)
B <- Matrix::expm(x)@x
dim(B) <- c(n, n)

all.equal(A, B)

Try the rexpokit package in your browser

Any scripts or data that you put into this service are public.

rexpokit documentation built on Nov. 22, 2023, 5:07 p.m.