How to speed up ode solver with "Events" options

2 views (last 30 days)
I have a ODE system written in M-file already, and I need to solve it in a big loop several time. I set the Event property in odeset ,which check one of the state reaching a particular value and stop the solving procedure.
In order to speed up the loop, I tried use codegen command to create MEX file, however it doesn't support the Event option.
So I want to know whether I use codegen command wrong or is there any good way to speed up?

Answers (0)

Categories

Find more on MATLAB Algorithm Acceleration 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!