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)X = (V,R) represent the voltage and recovery variables, respectively.

VV and RR are governed by the following differential equations:

dVdt=c(VV33+R) \frac{dV}{dt} = c(V-\frac{V^3}{3}+R)

dRdt=1c(Va+bR) \frac{dR}{dt} = -\frac{1}{c}(V-a+bR)

where θ=(a,b,c)\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.

tvec

vector of time points

Value

fnmodelODE returns an array with the values of the derivatives X˙\dot{X}.

fnmodelDx returns a 3-D array with the values of the gradients with respect to XX.

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)


[Package magi version 1.2.4 Index]