Neural Networks B, SS06 1

UA Dr. Robert Legenstein, WiMAus Prashant Joshi, M.S.

Institute for Theoretical Computer Science
Technische Universität Graz
A-8010 Graz, Austria
{legi, joshi}

NACHNAME Vorname Matrikelnmr Teammitglieder

Exercise 7: The HH Model

NOTE: You can download this exercise in pdf or postscript(ps) format here.

In this task you have to analyze the action-potential generation mechanism of the Hodgkin-Huxley(HH) model neuron for various current injections.

The Matlab program hh_model.m simulates a HH neuron.

Matlab Code

% hh_neuron implements a HH-Model with current injection Iext
clear all;

% parameters

dtSim = 1e-5;             % integration time constant for simulation
dtRec = 1e-4;             % intervals for recording traces
Tsim  = 1.0;              % simulation time

% define the input Iext

T1 = 5e-3;               % onset of stimulus [sec]
I0 = 1;                  % DC current injection [nA]

% make the current with a resolution of dtSim
Iext = [zeros(1,ceil(T1/dtSim)) I0*1e-9*ones(1,ceil((Tsim-T1)/dtSim)+1)];

% the time base for the input Iext and the simulation

% set up the model

% create the HHNeuron
hhn = csim('create','HHNeuron');

% create an analog input neuron and a synapse

% connect the input neuron to the HH-Neuron

% record some values during the simulation

% tell the recorder to record Vm and the spikes

% simulate model with Iext as input

% set parameters regarding the simulation control
csim('set','dt',dtSim);              % the integration time constant

% define an input signal (Iext) for the simulator
input(1).spiking = 0;
input(1).dt      = dtSim;
input(1).idx     = ain;
input(1).data    = Iext;

% set the integration time constant

% set time to 0.0

% run simulation for Tsim seconds

% get the relevant traces
Vm      =;
spikes  =;
nSpikes = length(spikes);

% time base for recorded traces
trec    = [dtRec:dtRec:Tsim];

% print number of spikes
fprintf('%i spikes / %g sec $ \backslash$n',nSpikes,Tsim);

% plot the results

figure(1); clf reset;

% plot input current
xlabel('time [sec]');
ylabel('Iext [nA]');
title('injected current','Fontweight','bold');
set(gca,'Xlim',[0 Tsim]);

% plot membrane voltage
plot(trec,Vm,'r'); hold on;
xlabel('time [sec]');
ylabel('Vm [V]');
title('membrane Voltage','Fontweight','bold');
axis tight

% plot the spikes
line([spikes;spikes],[0.03; 0.00]*ones(1,length(spikes)),...
hold on;
xlabel('time [sec]');
axis([0 1 0 0.1]) ;

About this document ...

Neural Networks B, SS06 1

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.70)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split=0 -no_navigation ex7.tex

The translation was initiated by Joshi Prashant on 2006-05-22


... SS061
Class Website:
... neuron2
Hint: you can create a Integrate and fire neuron in csim by following command: lif = csim('create','LifNeuron');

Joshi Prashant 2006-05-22