How can I stop ODE with an 'event' function?

1 view (last 30 days)
christophe
christophe on 26 Sep 2013
I'm using ode15s to solve a system of equations. i apply a sinusoidal load to my system, and i would like to stop my simulation once my system's response is sinusoidal too (when the transitional part of the response is damped)
I was thinking to create a function that compares the last two maximums of my response and stop solving when the difference between these maximums is inferior to a certain value. The thing is, I don't have any idea of how to do this
Any help would be greatly appreciated. Thanks.
Chris

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!