blob: 782cb20dcb696744f2db7ef210670320a2fe2455 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
model HodgkinHuxley
"Predator-Prey Model"
parameter Real G_Na =120 "conductance";
parameter Real G_K =36 "conductance";
parameter Real G_lk =0.3 "conductance";
parameter Real C =1.0 "membrane capacitance";
parameter Real V_Na =115 "potential";
parameter Real V_K =-12 "potential";
parameter Real V_lk =-49.387 "leakage";
Real n;
Real alpha_n;
Real beta_n;
Real m;
Real alpha_m;
Real beta_m;
Real h;
Real alpha_h;
Real beta_h;
equation
C * der(V_m) = - G_Na * (Vm - E_Na) - G_K * (V_m - E_K) - G_lk * (V_m - V_lk);
der(n) = - (alpha_n + beta_n) * n + alpha_n;
der(m) = - (alpha_m + beta_m) * m + alpha_m;
der(h) = - (alpha_h + beta_h) * h + alpha_h;
end HodgkinHuxley;
|