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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
