Assignment#1. Cog132. Due Wed. March15th at 11:59PM. 200 Points
Please submit an ipynb working file. This is a group assignment.
1. Replicate figure 1.8 below in Ermentrout and Terman. This is called a voltage-clamp experiment, where the
voltage is held at rest and then stepped up to a testing voltage. Step the voltage to 0,+30,+60 mV, and show all
the Na currents in one plot and the K currents together in another plot. Submit an ipynb file. From your
simulation explain the flow of Na ions (in or out of the cell) in all traces. Notice that our HH model is slightly
different than the one used by Ermentrout and Terman.
#2. Create a plot where you show all the activation and inactivation curves. In a separate plot, show the time
constants.
#3. Solve the HH equations with a brief pulse of current that produces an action potential. In this case, the
voltage is not clamped anymore. Try to figure out how to determine the scale of time exactly. Use a current
stimulation that is sin(wt) where w is the frequency of the stimulation. Use frequencies between 10 and 1000 hz
(wT=2pi and T=1/f) to show how the action potential is modulated. Change the amplitude of the sine wave so
that you can see an effect. because of the time scale, you also have to figure how to scale the frequency. Explain
what you see. Use the Euler integration and compare with the RK methods.
#4 Compare the accuracy of the Euler integration with the RK second order. Use the RK4 as the gold standard.
Calculate an approximate error and use it to monitor the error as the action potential is generated. How does the
error change in the Euler scheme in the different phases of the action potential?