How to exit a While Iterator Subsystem after iteration

1 view (last 30 days)
Hello in the picture i attached you see the while iterator subsystem. The while iterator higher "Out1" each iteration around 0.001 as long as the value from the min block is higher than 0.05. There consists one problem: The condition of the while iterator block is not only one time below 0.05 but also multiple times. But I only need the first value when the condition complies the very first time. Instead the iterator block is running forward more and more, so the output value "Out1" of the subsystem changes the whole time until the maximum iteration steps are reached.
Any suggestions how to get only the first value from "Out1" when the condition is reached the very first time??

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!