|
Contents | Previous | Next | Subchapters |
| Syntax |
expmat(A, tol, mstep) |
| See Also | exp , odepade |
The matrix exponential of A is defined by
2 3
I + A + A / 2! + A / 3! + ...
where the powers represent matrix multiplication.
x = {[1., 0.], [0., 2.]}
tol = 1e-4
mstep = 6
expmat(x, tol, mstep)
returns
{
[ 2.71828 , 0 ]
[ 0 , 7.38906 ]
}
Note that for diagonal matrices the matrix exponential is the
scalar exponential of the diagonal elements and the scalar exponential of
1 and 2 are 2.71828 and 7.38906, respectively.