[Numpy-discussion] Matrix Expontial for differenr t.

Pierre Haessig pierre.haessig at crans.org
Mon Jan 28 11:52:21 EST 2013


Hi,

Le 28/01/2013 17:31, Till Stensitzki a écrit :
> This is the calculates exp(-Kt).dot(y0) for a list a ts.
If your time vector ts is *regularly* discretized with a timestep h, you
could try an iterative computation

I would (roughly) write this as :

Ah = np.expm(A*h) # or use the "diagonalization + np.exp" method you
mentionned

y[0] = y0
for i in range(len(tlist)-1):
    y[i+1] = Ah*y[i]

best,
Pierre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130128/1e3b5f2b/attachment.sig>


More information about the NumPy-Discussion mailing list