# 2 cell network with 1 synapse # each cell modeled by the Morris-Lecar equations # 1 synapse from Cell 1 to Cell 2 # Declare the parameters p gl=2,gca=4.4,gk=8 p vk=-84,vl=-60,vca=120 p cv1=-1.2,cv2=18,cv3=2,cv4=30 p C=20 p phi1=.04,phi2=0.04 p i1=100,i2=60 p gsyn=1,Vth=-10,Erev=30,alpha=2,beta=0.1 # Define some functions minf(v)=.5*(1+tanh((v-cv1)/cv2)) winf(v)= .5*(1+tanh((v-cv3)/cv4)) lamw(v)= cosh((v-cv3)/(2*cv4)) icaf(v)=gca*minf(v)*(v-vca) # define the differential equations # Cell 1 v1'= (-gl*(v1-vl)-gk*w1*(v1-vk)-icaf(v1)+i1)/C w1'= phi1*(winf(v1)-w1)*lamw(v1) # Cell 2 v2'= (-gl*(v2-vl)-gk*w2*(v2-vk)-icaf(v2)-gsyn*s*(v2-Erev)+i2)/C w2'= phi2*(winf(v2)-w2)*lamw(v2) # synaptic gating s'=heav(v1-Vth)*alpha*(1-s)-heav(Vth-v1)*beta*s # some initial conditions -- not necessary but for completeness v1(0)=-61 w1(0)=0.015 v2(0)=-61 w2(0)=0.015 s(0)=0 # set the graphics window and numerics parameters @ maxstor=100000,total=500,bound=1000 @ method=rk4,dt=0.05,noutput=5 @ xlo=0,xhi=500,ylo=-65,yhi=40 # Done!! d