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 Comments

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.

Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 16 Jul 2020
Connect this signal to the "S" (set) of a S-R Flip-Flop block.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Release

R2018b

Asked:

on 16 Jul 2020

Answered:

on 16 Jul 2020

Community Treasure Hunt

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

Start Hunting!