## hhrun - Hodgkin Huxley model simulation for user defined input current

version 1.1.0.0 (2.88 KB) by
Simulates the Hodgkin Huxley model for user defined values of input current and variables

4.2K Downloads

Updated 28 May 2014

View License

This function simulates the Hodgkin-Huxley model for user specified input
current.

hhrun(I,tspan,V,m,h,n,Plot) function simulates the Hodgkin-Huxley model
for the squid giant axon for user specified values of the current input,
timespan, initial values of the variables and the solution method. As output it plots voltage (membrane potential) time series and also the plots between three variables V vs. m,n and h. It uses the forward euler method for solving the ODEs. Enter 1 in the plot field if you
want time series and V vs gating variable plots, 0 otherwise.

Usage:
Example 1 -

hhrun(10, 500, -65, 0.5, 0.06, 0.5,1)
where,
Input current is 10 mA
Timespan is 500 ms
-65 0.5 0.06 0.5 are the initial values of V,m,h and n respectively
Will display the voltage time series and limit cycle plots
Example 2 -
[V,m,h,n,t] = hhrun(8, 200, -65, 0.4, 0.2, 0.5,0);
V,m,h,n and t vectors will hold the respective values
There will be no plots since plot field is 0
plot(t,V) will generate the time series plot

### Cite As

Rohit Chandra (2021). hhrun - Hodgkin Huxley model simulation for user defined input current (https://www.mathworks.com/matlabcentral/fileexchange/46740-hhrun-hodgkin-huxley-model-simulation-for-user-defined-input-current), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2012a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!