fnmodelODE {magi} | R Documentation |
The FitzHugh-Nagumo (FN) equations
Description
The classic FN equations model the spike potentials of neurons, where system components X = (V,R)
represent the voltage and recovery variables, respectively.
V
and R
are governed by the following differential equations:
\frac{dV}{dt} = c(V-\frac{V^3}{3}+R)
\frac{dR}{dt} = -\frac{1}{c}(V-a+bR)
where \theta = (a,b,c)
are system parameters.
Usage
fnmodelODE(theta, x, tvec)
fnmodelDx(theta, x, tvec)
fnmodelDtheta(theta, x, tvec)
Arguments
theta |
vector of parameters. |
x |
matrix of system states (one per column) at the time points in |
tvec |
vector of time points |
Value
fnmodelODE
returns an array with the values of the derivatives \dot{X}
.
fnmodelDx
returns a 3-D array with the values of the gradients with respect to X
.
fnmodelDtheta
returns a 3-D array with the values of the gradients with respect to \theta
.
References
FitzHugh, R (1961). Impulses and Physiological States in Theoretical Models of Nerve Membrane. Biophysical Journal, 1(6), 445–466.
Examples
theta <- c(0.2, 0.2, 3)
x <- matrix(1:10, nrow = 5, ncol = 2)
tvec <- 1:5
fnmodelODE(theta, x, tvec)