Nov. 4, 2002
5:37 a.m.
On Mon, Nov 04, 2002 at 12:34:36PM +0100, Nils Wagner wrote:
Hi,
How can I solve the following ODE in scipy
A(t,z) \dot{z} = f(z), z(0) = z_0
where A is a real matrix depending on t and z; \dot denotes derivative with respect to time t.
from scipy import linalg, integrate def A(t,z): ... def f(z): ... def F(z, t): return linalg.solve(A(t,z), f(z)) t = arange(0, 100, 0.1) # or whatever z0 = array([...]) z = integrate.odeint(F, z0, t) -- Robert Kern Ruddock House President kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter