How to keep a boolean true value once it has been reached?

4 vues (au cours des 30 derniers jours)
Leonardus Yudha Septian Sutanto
Réponse apportée : Jonas le 8 Juin 2021
Hello everyone,
I have a boolean output in my Simulink model:
I would like to keep the true value once it has been reached, because I need it for another input. So the output should look like this:
Is it possible to modify it in Simulink?
Kind regards,
Yudha

Réponses (1)

Jonas
Jonas le 8 Juin 2021
Use the Boolean signal to trigger a Triggered Subsystem which triggers on rising edge, which contains a Constant 'true' which connects to its output. Set the initial value of the output to 'false'.
The output of the Triggered Subsystem will now switch from 'false' to 'true', and the output will be held.

Catégories

En savoir plus sur Schedule Model Components dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by