|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我用频闪法画系统分岔图,程序如下
function dy=controlmoxing(t,y,flag,c1)
w1=1.1;w2=1.2;a1=0.3;h1=0.2;g1=0.4;g2=0.5;u1=0.4;u2=0.6;beta1=0.1;beta2=0.1;c2=0.7;d1=-0.1;
d2=-0.1;omega=2.3;l1=0;l2=2.5;
dy=zeros(4,1);
dy(1)=y(2);
dy(2)=-w1^2*y(1)-a1*y(1)*cos(omega*t)+g2*y(3)...
+u2*y(4)+beta2*y(4)^3-c1*y(2)-d1*y(2)^3-l1*y(2)-l2*y(1)^3;
dy(3)=y(4);
dy(4)=-w2^2*y(3)+g1*y(1)+h1*y(1)*cos(omega*t)...
+u1*y(2)+beta1*y(2)^3-c2*y(4)-d2*y(4)^3;
clear;
clc;
clear all;
for c1=0:0.01:2
T=2*pi/2.3;
[t,x]=ode45('controlmoxing',0:T/100:200*T,[0.01,0.01,0.01,0.01],[],c1);
plot(c1,x(1500:100:end,1),'k.');
hold on
end
这是一个耦合的系统,按理说程序每次循环得到的x应该都是20001*4的矩阵吧,可是现在怎么得出来的是1432*4的呢,而且提示一下错误
Warning: Failure at t=3.909987e+001. Unable to meet integration tolerances without reducing the step size below the smallest
value allowed (1.136868e-013) at time t.
> In ode45 at 371
In fencha at 6
??? Error using ==> plot
Vectors must be the same lengths.
Error in ==> fencha at 7
plot(c1,x(1500:100:end,1),'k.');
这应该是说减小步长吧,可是我改变取样点数或c1都没什么变化,反而改变初值倒是能改变x的维数,请问这是怎么回事呢,是因为参数选取的问题吗,还请各位指教
|
|