-
Notifications
You must be signed in to change notification settings - Fork 1
/
fEr2HT.m
29 lines (23 loc) · 971 Bytes
/
fEr2HT.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
28
29
# 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:
# IH+IT+IL=0
# The function fEr2HT 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=fEr2HT(x)
global gbl; #gbl=[gH,gCa,gL,EH,ECa,EL,parmH,parmT,parhT];
mHr=fmh(0.,x,1,-1,gbl(7:13),0,0,0); # steady-state activ. at Er
mH3r=mHr^3;
m1r=fmh(0.,x,1,-1,gbl(14:18),0,0,0); # steady-state activ. at Er
h1r=fmh(0.,x,1,-1,gbl(19:23),0,0,0); # steady-state inactiv. at Er
m3hr=m1r^3*h1r;
y=gbl(1)*mH3r*(x-gbl(4))+gbl(2)*m3hr*(x-gbl(5))+gbl(3)*(x-gbl(6));
endfunction