In Simulink, when a condition is met, I want to keep a constant result even when this condition ends.

조회 수: 4 (최근 30일)
In, Simulink; If the condition u1 > u2 is achieved, I want to keep sending the output of u1 > u2 even if u1 < u2.
In Code, like break.

답변 (1개)

Muthukumar Ganesan
Muthukumar Ganesan 2022년 8월 21일
Hi,
Please refer to the attachment.
Hope you are referring to this logic. Thanks
Static Temp=0;
if (u1>u2 && Temp !=1)
Temp = 1;
if (Temp == 1)
Out = u1>u2;

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by