Matrix exponential function taken from complexplus package to reduce the number of spant dependencies.
matexp(x)
x
a square complex matrix.
the matrix exponential of x.