| 查看: 853 | 回复: 2 | |||
[交流]
Error using plot Vectors must be the same length.如下程序如何更改?
|
|||
|
Error using plot Vectors must be the same length.如下程序如何更改? hold on %figureaxes >> q1=0.94;q2=0.94;q3=0.94; %x,y,z >> h=0.05;T=250; %hT >> a=0.45;b=0.75; % >> p1=16.5;p2=17.5; %pp1p2 >> m1=1;m2=1; % >> x0=0.1;y0=0.001;z0=0.001; % >> x0=1;y0=1;z0=2; % >> p=p1; %p%---- ----- >> x(1)=x0+h^q1*y0; >> y(1)=y0+h^q2*(x0-b*y0-x0*z0); >> z(1)=z0+h^q3*(-a*z0+x0*x0); >> t=m1*h;n=1; % >> % ------ -------- >> while t<=T % n=n+1; % M1=0;M2=0;M3=0; % % xyz for k=1:n-1 M1=M1+(-1)^(k)*gamma(q1+1)/(gamma(k+1)*gamma(q1-k+1))*(x(n-k)-x0); M2=M2+(-1)^(k)*gamma(q2+1)/(gamma(k+1)*gamma(q2-k+1))*(y(n-k)-y0); M3=M3+(-1)^(k)*gamma(q3+1)/(gamma(k+1)*gamma(q3-k+1))*(z(n-k)-z0); end %5m1*hm2*h if p==p1 p=p2;t=t+m2*h; else p=p1;t=t+m1*h; end % x(n)=x0-M1+h^q1*y(n-1); y(n)=y0-M2+h^q2*(x(n)-b*y(n-1)-x(n)*z(n-1)); %pp1p2 z(n)=z0-M3+h^q3*(-a*z(n-1)+x(n)*x(n)); end % >> t=0:h:T; % >> figure(13) %x(t) >> plot(t,x,'K');xlabel('t'),ylabel('x'); 错误提示: Error using plot Vectors must be the same length. 提供帮助的虫子50金币奖励,谢谢大家 |
» 猜你喜欢
越来越担心硕士毕业后没有竞争力了
已经有14人回复
论文的挂名怎么评判贡献?基金申请中,排名第一的挂名文章
已经有3人回复
申博自荐 2篇一区TOP+1篇EI+2公开发明专利 2027博士申请
已经有3人回复
闲聊
已经有6人回复
申博求助
已经有4人回复
简单回复
M塞北2楼
2017-10-24 05:09
回复
dsctg3楼
2017-10-24 08:40
回复
Math露珠(金币+1): 谢谢参与










回复此楼