Tspan is not strictly increasing.

3 次查看(过去 30 天)
I am trying to solve a second order ode using ODE45 but my tspan is not strictly increasing. How can I solve it ?

采纳的回答

Stephan
Stephan 2019-11-27
Since ode45 uses an automated stepwide control just define the start and the end of your tspan this way:
tspan = [0 10];
This is all you have to do to solve this problem.
  3 个评论
Stephan
Stephan 2019-11-28
tspan = sort(unique(T0));
should solve this.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by