Changes between Version 2 and Version 3 of OdeintRedesign

Show
Ignore:
Timestamp:
04/12/09 10:53:44 (4 years ago)
Author:
pv
Comment:

Add a simple use case

Legend:

Unmodified
Added
Removed
Modified
  • OdeintRedesign

    v2 v3  
    1919  2. One wrapper function `odeint` (or something similar) with a suitable keyword argument. 
    2020 
     21== Use cases == 
     22 
     23=== Integrate a simple ODE === 
     24 
     25{{{ 
     26import numpy as np 
     27from scipy.integrate import vode 
     28 
     29def f(t,y): 
     30    return -2*y + np.array([np.cos(t),0,0]) 
     31 
     32t = np.linspace(0, 20, 200) 
     33y = np.vode(f, t=t, y0=[0,1,2]) 
     34}}} 
     35 
    2136== Related == 
    2237