Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试绘制 ODE 系统的解决方案。代码是:
tspan = [0 10]; z0 = [0.01 0.01 0.01 0.01]; [t,z] = ode45(@(t,z) odefun3(t,z), tspan, z0); plot(z(:,3))
为什么输出绘制在区间 [0,60] 而不是 [0,10] 上,如代码中所示?
plot我通过在命令下添加第一个变量来修复它: plot(t,z(:,3)).
plot
plot(t,z(:,3))