24小时热门版块排行榜    

查看: 303  |  回复: 0

cwhe_10

新虫 (小有名气)

[求助] 混沌Lorenz系统数据生成仿真报错,怎么办?

子函数:
function dx=Lorenz_cwhe(t,x)
dx=zeros(3,1);
dx(1)=-10*(x(2)-x(3));
dx(2)=x(1)*(28-x(3))-x(2);
dx(3)=x(1)*x(2)-8*x(3)/3;
end
主函数:
clc;clear;close all;
[t,x]=ode45(@Lorenz_cwhe,[0 0.01 15],[0 3 1.5]);
figure
plot(t,x(:,1),'-*k',t,x(:,2),':dk',t,x(:,3),'--+k');
legend('y1','y2','y3');

报错提示:
Undefined function 'odearguments' for input arguments of type 'function_handle'.

Error in ode45 (line 114)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...

Error in Lorenz_data_cwhe (line 2)
[t,x]=ode45(@Lorenz_cwhe,[0 0.01 15],[0 3 1.5]);

关键:还有个问题是Lorenz的积分步长为0.01是在哪设置的呀?
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 cwhe_10 的主题更新
信息提示
请填处理意见