Learn R Programming

kexpmv (version 0.0.3)

expokit_dgpadm: EXPOKIT dgpadm matrix exponentiation on a square matrix

Description

This function exponentiates a matrix via the EXPOKIT padm function.

Usage

expokit_dgpadm(mat = NULL, t = 15, transpose_needed = TRUE)

Arguments

mat

an input square matrix.

t

time value to exponentiate by.

transpose_needed

If TRUE (default), matrix will be transposed.

Details

From EXPOKIT:

* Computes exp(t*H), the matrix exponential of a general matrix in * full, using the irreducible rational Pade approximation to the * exponential function exp(x) = r(x) = (+/-)( I + 2*(q(x)/p(x)) ), * combined with scaling-and-squaring.

This function is recommended when dealing with small dense matrices. However it can also be used for large sparse matrices when the infinity norm is approximately >100.

Examples

Run this code
# NOT RUN {
# Define input matrix to be exponentiated
mat=matrix(c(-0.071207, 0.065573, 0.005634, 0, -0.041206, 0.041206, 0, 0, 0), 
nrow=3, byrow=TRUE) 

# Define value of t 
t=15

# Exponentiate with EXPOKIT's dgpadm
	Pmat = expokit_dgpadm(mat=mat, t=t, transpose_needed=TRUE)
	print(Pmat)


# }

Run the code above in your browser using DataLab