# a simple direction field ODE # xpp treats time differently from other variables # and direction fields need two dimensions, so # we add dummy, s, which is just t + C # here is the first example from class # this is a function f(v,s)=g-gamma*v/m # # here are the ODEs # v'=f(v,s) s'=1 # # here are some parameters par g=9.8,gamma=2,m=10 # # these commands control the plot range and the view # they can also be changed within XPP # @ xlo=-1,xhi=10,ylo=45,yhi=60 @ xp=s,yp=v done