File: ml1.ode

package info (click to toggle)
xppaut 8.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,332 kB
  • sloc: ansic: 74,690; makefile: 127; sh: 92
file content (32 lines) | stat: -rwxr-xr-x 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# The Morris-Lecar equations ml1.ode
#  NOTE: I use only the first letter for declarations!
# Declare the parameters
p gl=.5,gca=1,gk=2
p vk=-.7,vl=-.5,vca=1
p v1=.01,v2=.145,v3=.1,v4=.15
p i=.2,phi=.333   
  
# Define some functions
minf(v)=.5*(1+tanh((v-v1)/v2))
winf(v)= .5*(1+tanh((v-v3)/v4))
lamw(v)= cosh((v-v3)/(2*v4))

# define the right-hand sides
v'= gl*(vl-v)+gk*w*(vk-v)-icaf+i
w'= phi*lamw(v)*(winf(v)-w)

# where
icaf=gca*minf(v)*(v-vca)
init v=-.144,w=.03
# and
aux ica=icaf
# some initial conditions -- not necessary but for completeness
v(0)=.05
w(0)=0

# some options
@ xp=v,yp=w
@ xlo=-1,xhi=1,ylo=-.1,yhi=1,nmesh=100
@ total=50
# Done!!
d