Hi,
i have a program in neuron that simulates pyramidal neuron
i wanna convert neuron code to matlab code
i have accomplished the Ina,Ik,Im and Isynps currents.these algorithms works well,and tested with neuron datas,it is succesfull.
but the problem is I cannot calculate the Vm by using that equations;
Isnp=ge*(vm-Ee)+gi*(vm-Ei);
Ina=Gna*m*m*m*h*(vm-Ena);
Ikd=Gkd*n*n*n*n*(vm-Ek);
Im=Gm*mn*(vm-Ek);
vm=vm+dt*(-Gl*(vm-El)-Ina-Ikd-Im-(1/A)*Isnp);
I use euler algorithm as I have used it before for single compartment
HH model. but the euler method doesnt work here
my questions:
1-how neuron calculate vm and Itotal?,
2-is my vm calculation method true?
regards,
neuron to matlab convertion
Matlab HH example
A couple of years ago I used a text for teaching physiological modeling to engineers,
MODELING AND SIMULATION IN MEDICINE AND THE LIFE SCIENCES
Second Edition
FC Hoppensteadt and CS Peskin
New York: Springer-Verlag, 2002
In Chapter 3 there is a very good description of the Hodgkin-Huxley model for squid axon and the Matlab code to implement it can be downloaded from Charles Peskin's website,
http://math.nyu.edu/faculty/peskin/ModSimPrograms/ch3/
Grab all the m-files in that directory, save them to a directory on your machine, cd to that directory from the Matlab prompt and type >>HH . You should be presented with a spike. Then you can look at how the forward Euler integration is setup and use that as an example.
With that said, why would you do this? Are you simulating a multicompartment pyramidal neuron? I use this for simple 1- or 2-comparment models for teaching students who already use Matlab. As soon as they get serious they graduate to Neuron.
MODELING AND SIMULATION IN MEDICINE AND THE LIFE SCIENCES
Second Edition
FC Hoppensteadt and CS Peskin
New York: Springer-Verlag, 2002
In Chapter 3 there is a very good description of the Hodgkin-Huxley model for squid axon and the Matlab code to implement it can be downloaded from Charles Peskin's website,
http://math.nyu.edu/faculty/peskin/ModSimPrograms/ch3/
Grab all the m-files in that directory, save them to a directory on your machine, cd to that directory from the Matlab prompt and type >>HH . You should be presented with a spike. Then you can look at how the forward Euler integration is setup and use that as an example.
With that said, why would you do this? Are you simulating a multicompartment pyramidal neuron? I use this for simple 1- or 2-comparment models for teaching students who already use Matlab. As soon as they get serious they graduate to Neuron.