MATLAB Answers

Cannot plot on Matlab

3 ビュー (過去 30 日間)
Alex Din
Alex Din 2019 年 10 月 29 日
Commented: Walter Roberson 2019 年 11 月 6 日
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 件のコメント

Walter Roberson
Walter Roberson 2019 年 11 月 6 日
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.

サインイン to comment.

件の回答 (1)

Ganesh Regoti
Ganesh Regoti 2019 年 11 月 6 日
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

  0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。

タグ


Translated by