# stoch_ml.ode # initial data v(0)=-40 w(0)=1 # wiener process wiener b # parameter N for number of channels par n=100 # functions for the gates minf=.5*(1+tanh((v-v1)/v2)) winf=.5*(1+tanh((v-v3)/v4))+.05 tau=1/(phi*cosh((v-v3)/(2*v4))) # variance for the potassium channel gate, w gam=((1-2*winf)*w+winf)/(n*tau) # differential equations dv/dt=(iapp-gl*(v-vl)-gk*max(w,0)*(V-Vk)-gca*minf*(v-vca))/c dw/dt=(winf-w)/tau+sqrt(gam)*b # parameters par iapp=10,vk=-70,c=1,gk=2,vca=100,gca=1.333,vl=-50,gl=.5,v1=-1,v2=15 par phi=.333,v3=10,v4=14.5 # integration control @ total=500,dt=.01,nout=10,meth=euler # plot control - shows voltage vs time @ xlo=0,xhi=500,ylo=-60,yhi=50,maxstor=10000 done