How to create an integrator that self - resets when reaching a specific threshold

1 view (last 30 days)
I want to create an integrator that self - resets to initial condition ( for example 0 ) when the output of the block's output port reaches a specific threshold ( for example 100 ). How can i do that using the State port? If possible please attach the (.mdl) file. Thank you!

Answers (0)

Categories

Find more on Modeling 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!