-
Notifications
You must be signed in to change notification settings - Fork 1
/
fEr2.m
27 lines (21 loc) · 850 Bytes
/
fEr2.m
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
# THIS SOFTWARE COMES WITH NO WARRANTY WHATSOEVER, EXPRESSED OR IMPLIED.
# USE IT AT YOUR OWN RISK!
#
# By T.I. Toth, Cardiff University, U.K.; 1996-2002
#
#
# Steady-state current balance equation for computing Er, the
# resting potential of a neurone:
# IT+IL=0
# The function fEr2 below is used by fsolve a solver routine of
# systems of nonlinear equations.
# The parameters are passed as global var.s to the function.
# The fct. fmh() computes the time course of m(t), h(t) or m(t)^k*h(t)
# of a membrane current when t, V(t) and init value(s) are given;
function y=fEr2(x)
global gbl; #gbl=[gCa,gL,ECa,EL,parmT,parhT];
m1r=fmh(0.,x,1,-1,gbl(5:9),0,0,0); # steady-state activ. at Er
h1r=fmh(0.,x,1,-1,gbl(10:14),0,0,0); # steady-state inactiv. at Er
m3hr=m1r^3*h1r;
y=gbl(1)*m3hr*(x-gbl(3))+gbl(2)*(x-gbl(4));
endfunction