MatCont的相位响应曲线(多条曲线)

时间:2018-09-15 12:47:25

标签: matlab

我不知道这里是否是问这个问题的正确地方,无论如何这是一个编程问题。

我正在使用MatCont来计算Hodgkin Huxley模型的相位响应曲线,并且试图重现下图。

enter image description here

来自神经科学的相位响应曲线,内森·舒尔特斯(Nathan W. Schultheiss)p.261

在代码中,首先,我找到了一个平衡点,通过import requests print("Download is start!") url = 'https://pmd.cdn.turner.com/cnn/big/cnn10/2018/09/13/caption/ten-0914.cnn_2253601_768x432_1300k.mp4' r = requests.get(url, stream = True) with open('20180914.mp4', "wb") as mp4: for chunk in r.iter_content(chunk_size = 768*432): if chunk: mp4.write(chunk) print("Download over!") ,分叉点存储在init_EP_EP中。我继续在s处出现Hopf的曲线。最后,我使用init_H_LC函数从极限循环(LC)的一点继续绘制曲线。 在每个循环中,我从LC上的相同点开始,然后继续增加点(增加init_LC_LC),然后计算PRC曲线。
看来有些错误,而且效率也不高。

MaxNumofPoints

为防万一,global x v s h f opt OPTIONS=[]; hls = HodgkinHuxley; % find an equilibrium point initial_condition = [-65.0 0.05293248525724958 0.3176769140606974 0.5961207535084603]; Istim=4.0; [t,y] = ode45(hls{2},[0 1000],initial_condition,OPTIONS,Istim); x0 = y(end,:)'; opt = contset; opt = contset(opt, 'Singularities', 1); opt = contset(opt, 'MaxStepsize', 1); opt = contset(opt, 'MaxNumpoints', 1000); ap = 1; %active parameter is Istim Istim = 7.5; [x1, v1] = init_EP_EP(@HodgkinHuxley, x0, Istim, ap); [x,v,s,h,f] = cont(@equilibrium, x1,[], opt); x1=x(1:4,s(3).index); % set initial state variables on H Istim = x(end,s(3).index); % set the Inp where Hopf occures disp(Istim); ap = 1; ntst= 40; ncol= 4; maxnumpoints=50; [x0,v0]=init_H_LC(@HodgkinHuxley,x1,Istim,ap,1e-6,ntst,ncol); opt = contset(opt,'Multipliers',0); opt = contset(opt,'Adapt',1); opt = contset(opt,'MaxStepsize',5); opt = contset(opt,'FunTolerance',1e-6); opt = contset(opt,'VarTolerance',1e-6); opt = contset(opt,'MaxNumPoints',maxnumpoints); [xlc,vlc,slc,hlc,flc]=cont(@limitcycle,x0,v0,opt); figure(2); hold on; for i1=1:4 Istim = xlc(end,end); disp(Istim); [x0,v0]=init_LC_LC(@HodgkinHuxley,xlc,vlc,slc(end),Istim,ap,ntst,ncol); opt = contset(opt,'PRC',1); opt = contset(opt,'Adapt',1); opt = contset(opt,'MaxStepsize',5); opt = contset(opt,'FunTolerance',1e-6); opt = contset(opt,'VarTolerance',1e-6); opt = contset(opt,'Input',1); opt = contset(opt,'MaxNumPoints',40*i1); [xlc2,vlc2,slc2,hlc2,flc2]=cont(@limitcycle,x0,v0,opt); fvector=flc2(:,end); ind1 = ntst+2; ind2 =ntst+2+ncol*ntst; PRC10=fvector(ind1:ind2); dPRC10=fvector((ind2+1):end); phi = linspace(0,1,length(PRC10)); plot(phi, PRC10); legendInfo{i1} = ['Inp= ' num2str(xlc2(end,end))]; end legend(legendInfo); 文件已上载here

结果: enter image description here

0 个答案:

没有答案