hogsonik 发表于 2009-4-25 00:38

带有时滞项的duffing系统poincare截面程序

根据论坛上的程序,自己修改的求解带有时滞项的duffing方程的poincare截面,但是却得不到下面的poincare图形,请高手们看看哪个地方出了错!
poincare截面为:x(t-tau)=0, dx(t-tau)>0
function dxdt = cutting(t,x,Z)
u=0.8;
zeta=0.25;
mu=0.1;
xlag=Z(:,1);
dxdt=zeros(2,1);
dxdt = [x(2)
                u*xlag(1)-2*zeta*x(2)-x(1)-mu*x(1)^3
             ];

第二个m文件
clc
clear
Z=[];
tau=7.4;
sol=dde23('cutting',tau,,);
step=20;
x=0:1/step:1000;
y=deval(sol,x,1);
yp=deval(sol,x,2);
Y=';
for k=1:length(Y)-step
if abs(Y(k,1)-0)<1e-2 & Y(k,2)>0; % Be careful of 0, that is z=0, namely, on the plane of x-y, the Poincare sections we chose in this paper,
%which can be selected any other Poincare section if you like, e.g. x,y,z=0 or others!
Z=;
end
end
plot(Z,'*','markersize',2)
title('Dufing x(t-tau)=0 & dx(t-tau)>0')
xlabel('x'),ylabel('dx')'

[ 本帖最后由 hogsonik 于 2009-4-25 00:45 编辑 ]
页: [1]
查看完整版本: 带有时滞项的duffing系统poincare截面程序