π» Coding Mission
Plot the LIF Simulation
Click Run to start Python
Run the full LIF simulation and create a 2-panel figure showing I(t) and V(t). Your task: 1. Run simulation storing t_list, v_list, i_list (in ms, mV, pA) 2. Create: fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(8, 5), sharex=True) 3. Top panel (ax1): plot I(t) in pA, ylabel='I (pA)', title='Synaptic Current' 4. Bottom panel (ax2): plot V(t) in mV, add axhline at y=-50 (threshold), ylabel='V (mV)', xlabel='Time (ms)', title='Membrane Voltage' 5. ax2.legend() and plt.tight_layout()
Hints (only if you're stuck!)
solution.py
β Loading...