[Numpy-discussion] Matrix Expontial for differenr t.

Pierre Haessig pierre.haessig@crans....
Mon Jan 28 10:52:21 CST 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.scipy.org/pipermail/numpy-discussion/attachments/20130128/1e3b5f2b/attachment.bin 


More information about the NumPy-Discussion mailing list