This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/projects/project_lif/solution/passivemembrane.m
2017-01-23 13:30:51 +01:00

9 lines
168 B
Mathematica

function voltage = passivemembrane(V0, E, tau, dt)
voltage = zeros(length(E), 1);
V = V0;
for k = 1:length(E)
voltage(k) = V;
V = V + (-V+E(k))*dt/tau;
end
end