chap2/mat_exp.py
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 27 May 2011 14:24:59 +0530
changeset 0 0efde00f9229
permissions -rw-r--r--
Initial commit.

#!/usr/bin/python
## 2.2

import scipy as sp
from scipy import linalg

F=sp.array([[-1,0],[1,0]])
print linalg.expm(F)

# """
# 1. linalg.expm computes the matrix exponential using Pade approximation.
# 2. linalg.expm2 computes the matrix exponential using eigenvalue decomposition.
# 3. linalg.expm3 computes the matrix exponential using Taylor series.
# """