In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [2]:
from pyndamics import Simulation


pyndamics version  0.0.7

In [4]:
sim=Simulation()
sim.add("y'=y - 1/2*exp(t/2)*sin(5*t) + 5*exp(t/2)*cos(5*t)",0)
sim.run(0,5)

In [6]:
t,y=sim.t,sim.y
plot(t,y)
y2=exp(t/2)*sin(5*t)
plot(t,y2,'r--')


Out[6]:
[<matplotlib.lines.Line2D at 0x152699cf90>]

In [ ]: