diff -r 000000000000 -r 0efde00f9229 chap2/mat_exp.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chap2/mat_exp.py Fri May 27 14:24:59 2011 +0530 @@ -0,0 +1,16 @@ +#!/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. +# """ + +