How to modify settings for event detection in MATLAB?

1 次查看(过去 30 天)
I am writing a code for event detection. However, I want to increase the region of convergence from zero to about 1e-4.For example, instead of checking for y(1)-10=0, I want to check for y(1)-10<1e-4. How can this be done?
  2 个评论
Walter Roberson
Walter Roberson 2013-6-28
Are you referring to event detection in the context of one of the ode*() routines?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2013-6-28
Return
y(1)-10 >= 1e-4
This will be false (0) when it is within 1e-4. Set the options so the crossing direction does not matter.
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by