Hold a value indefinitely once a condition becomes true

조회 수: 34 (최근 30일)
Fawad Farooq Ashraf
Fawad Farooq Ashraf 2022년 10월 13일
댓글: Fawad Farooq Ashraf 2022년 10월 13일
I have a simulink block diagram which gives true or false based on a condition (relational operator). My problem is that once I get true for the first time, I want to stop checking the condition and just output true for the rest of simulation time. How can I do that in SIMULINK?

채택된 답변

Jim Riggs
Jim Riggs 2022년 10월 13일

추가 답변 (1개)

Les Beckham
Les Beckham 2022년 10월 13일
One way would be to route the output of the relational operator to two places: (1) a summing junction or an OR block, and (2) a memory block or unit delay block if your signals are discrete time. Then connect the output of the memory block to the other input of the OR block. I don't have Simulink right now or I'd create an example.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by