|
楼主 |
发表于 2009-8-19 09:04
|
显示全部楼层
clf
w0=1;a=-1;b=-0.3;r=0.2;omega=1.1;g1=1;g2=1;f=0.1:0.1:5;
lags=[pi/2,2*pi/3];T=2*pi/omega;
y1=[];G=[];y2=[];
for h=1:length(f)
sol=dde23(@yanchi,lags,[0.1 0],[0:T/100:40*T],f(h));
y1=[y1,sol.y(1,2000:100:end)];y2=[y2,sol.y(2,2000:100:end)];
m=length(y1);
for j=1:m/h
G=[G,f(h)];
end;p=length(G);
N=length(f);
Over_to_step=N-i;
end
figure(1)
plot(G,y1,'k.','markersize',3)
hold on
function dy=yanchi(t,y,Z,f)
w0=1;
a=-1;
b=-0.3;
r=0.2;
omega=1.1;
g1=1;
g2=1;
f=0.1:0.1:5;
dy=[y(2);-w0^2*y(1)-a*y(2)-a*b*y(1)^2*y(2)-w0^2*r*y(1)^3+f*cos(omega*t)+g1*Z(1,1)+g2*Z(2,2)] |
|