# a 20 compartment mode with a synaptic input and sealed conditions # [x0-.5,x0+.5] is position of input # 20*dx is the electrotonic length of the cable s(t,x)=heav(x+.5-x0)*heav(x0+.5-x)*amp*t*exp(-t/tau)/tau v0'=-v0+(v1-v0)/(dx^2)+s(t,0) v[1..19]'=-v[j]+(v[j+1]-2*v[j]+v[j-1])/(dx^2) + s(t,[j]) v20'=-v20+(v19-v20)/(dx^2) + s(t,20) dx=L/20 par tau=1,amp=5,x0=0,L=2 @ total=20,meth=cvode,toler=1e-5,atoler=1e-4,dt=.1,yhi=.2,ylo=0 @ xhi=20,yp=v0 done