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 comentarios

Rebecca Red
Rebecca Red el 16 de Jul. de 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.

Iniciar sesión para comentar.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 16 de Jul. de 2020

0 votos

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

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Preguntada:

el 16 de Jul. de 2020

Respondida:

el 16 de Jul. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by