neuron_1=function(t,y) { # # Transfer dependent variable vector to problem variables vn=y[1]; wn=y[2]; # # Neuron model ODEs dvndt=(k*(vn-vr)*(vn-vt)-wn+In[i])/C; dwndt=an*(bn*(vn-vr)-wn); # # Increment calls to neuron_1 ncall <<- ncall+1 # # Return derivative vector return(c(dvndt,dwndt)) }