spriner 发表于 2012-6-1 00:01

matcont如何做脉冲方程的分支分析

本帖最后由 spriner 于 2012-6-1 00:04 编辑

在下不才,想用matcont做一个双点脉冲的常微分方程的分支分析,但是在用matcont建立系统的时候总是出现问题,下面是我的代码,请各位赐教。

I use x,y and z as the coordinate, RHO, A, MU, L, T, ZETA are parameters, T is the period of the pulses, 1-5th orders are all numerically, the codes are the following:

function dydt = fun_eval(t,kmrgd,RHO,A,MU,L,T,ZETA)
function dxda = difeqs(a, x)
dxda = [ RHO*x(1) - A*x(1)*x(2) ; MU*x(2) ; (A-RHO)*x(1)];
end
odesolver = @ode45;
optode = [];
optode = odeset(optode, 'RelTol', 1.0E-6);
optode = odeset(optode, 'AbsTol', 1.0E-9);
y1s = ;
   = odesolver(@difeqs, , y1s, optode);
y2s = y1e(length(y1e),:);
y2s(1) = y2s(1)+RHO*T;
   = odesolver(@difeqs, , y2s, optode);
y3 = y2e(length(y2e),:);
dydt=;
end


But there is an error: Equations are in the wrong order, compared to the coordinates. Please help me to solve this, thanks very much!!!
页: [1]
查看完整版本: matcont如何做脉冲方程的分支分析