How to hold True value infinite

I have a variable that will be false, true, then false. I want to home onto the true value on a second variable until the end of the simulation. For example the window is clean, until I touch it. I have a Boolean variable if I’m touching the glass. But I want to capture the window and it’s now forever smudge.

2 commentaires

Rebecca Red
Rebecca Red le 16 Juil 2020
I think that gets close, but I currently only have the one input. I’m not sure how to translate that to just hold the first Boolean switch to true.

Connectez-vous pour commenter.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 16 Juil 2020

0 votes

Connect this signal to the "S" (set) of a S-R Flip-Flop block.

Catégories

En savoir plus sur Simulink dans Centre d'aide et File Exchange

Produits

Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by