Is there a way to terminate integration when multiple events are triggered simultaneoulsy?

4 views (last 30 days)
Multiple events can be included in an ODE event function, but it seems there is only capability to detect and act on each event individually. I need a way to be able to terminate integration when multiple events are all triggered simultaneoulsy. E.g., when multiple functions are negative at the same time. Is there any way to do this?

Accepted Answer

Walter Roberson
Walter Roberson on 19 Mar 2024
Adjust the isTerminal flag as all(TheExpressions < 0) or as appropriate.
  7 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Function Creation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!