Coupling neurons: recording spike times with ode45
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, all. I'm attempting to couple some Hodgkin-Huxley-type neurons in a way that requires me to record spiking times. I'm wondering what the best way to do this is.
The problem I'm running into is as follows: I'm using ode45, and I'm not quite sure how to make it so that I can record spiking times AND update the appropriate term(s) in the differential equations accordingly while ode45 continues to solve. In other words, although I can envision ways to write code that would record spiking times for, say, neuron 1 (e.g., if the membrane potential is above some threshold at time t and below that threshold at time t-1, then record time t), I'm not sure how to write the code so that my expression for the membrane potential for neuron 2 takes that spike into consideration and receives an input current. (One of my differential equations takes spike times as a parameter.)
As a start, here is an example of something crude I've written thus far that allows me to record the spiking times. "spikingtimes" records the, err, spiking times; "allv" records the membrane potentials at each step; and "twov" contains two elements, the current and previous membrane potentials. I'm sure this is not the most efficient way to do things, and I'm furthermore neglecting the problem of needing to update the differential equations after recording the spikes.
spikingtimes = zeros(1,20);
allv = zeros(1,20);
twov = [-30 0];
for t = 1:20
[T,Y] = ode45(f,[0,t],[-30 0 0 .4]);
allv(t) = Y(end,1);
twov(2) = Y(end,1);
if twov(1) < -20 && twov(2) > -20
spikingtimes(t) = 1;
end
twov(1) = twov(2);
end
I hope there's a way to do this—I'm not sure if I need to write my own ODE solver or if this can be done using something like ode45. The eventual goal is to have a network of about twenty neurons of about four different types that are connected to one another, so figuring out how to couple neurons in MATLAB seems like a pretty crucial first step. I would very much appreciate any help—thanks!
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Neuromicroscopy in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!