Cannot plot on Matlab

1 vue (au cours des 30 derniers jours)
Alex Din
Alex Din le 29 Oct 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.
addpath(genpath(('C:\Users\User\Downloads\DynaSim-master\DynaSim-master')))
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 commentaire
Walter Roberson
Walter Roberson le 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.

Connectez-vous pour commenter.

Réponses (1)

Ganesh Regoti
Ganesh Regoti le 6 Nov 2019
Hi,
Cross-verify if you are getting data from you dsSimulate function. If you are getting valid data there are different set of plots which might suit your purpose. Here is the link to plot functionality in MATLAB
There is one another way of plotting your data. If you load the data in workspace then you can use Plot Gallery which contain built-in plots to plot. You can select the plots in PLOTS toolstrip of MATLAB. Here are the built-in plots available in MATLAB

Catégories

En savoir plus sur Neural Simulation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by