# Cannot plot on Matlab

2 views (last 30 days)
Alex Din on 29 Oct 2019
Commented: Walter Roberson on 6 Nov 2019
I'm trying to find plots for the Hodgkin Huxley model using Matlab looked online at some papers and found this below however all I get is the axis.
eqns={
'gNa=120; gK=36; Cm=1'
'INa(v,m,h) = gNa.*m.^3.*h.*(v-50)' % Inactivating sodium current
'IK(v,n) = gK.*n.^4.*(v+77)' % Potassium current
'dv/dt = (10-INa(v,m,h)-IK(v,n))/Cm; v(0)=-65'
'dm/dt = aM(v).*(1-m)-bM(v).*m; m(0)=.1'
'dh/dt = aH(v).*(1-h)-bH(v).*h; h(0)=.1'
'dn/dt = aN(v).*(1-n)-bN(v).*n; n(0)=0'
'aM(v) = (2.5-.1*(v+65))./(exp(2.5-.1*(v+65))-1)'
'bM(v) = 4*exp(-(v+65)/18)'
'aH(v) = .07*exp(-(v+65)/20)'
'bH(v) = 1./(exp(3-.1*(v+65))+1)'
'aN(v) = (.1-.01*(v+65))./(exp(1-.1*(v+65))-1)'
'bN(v) = .125*exp(-(v+65)/80)'
};
%%data = dsSimulate(eqns);
figure;
%plot(data. time.[0 200] data. membrane potential [0 10])
xlabel('time (ms)');
ylabel('membrane potential (mV)');
title('Hodgkin-Huxley neuron')
How do I go about getting the trace for this?

#### 1 Comment

Walter Roberson on 6 Nov 2019
If you have the Symbolic Toolbox then you could consider converting to set up differential equations using symbolic form. I suspect that dsolve() might not be able to deal with the system, but you could use odeFunction() to create functions for use with ode45() or related. See the first example for odeFunction which demonstrates the sequence of functions to use to do proper conversion.