How to stop if else condition after it executes only once.
조회 수: 3 (최근 30일)
이전 댓글 표시
I have created a simulink block to execute if else condition. But, I need to stop this condition after it exucute once. How to do it?
댓글 수: 3
Soniya Jain
2021년 6월 27일
I am not sure but you can try to use "persistent" variable in your code, persistent means that the variable will still remember its value the next time the function is called. Refer a MATLAB Answer https://www.mathworks.com/matlabcentral/answers/113017-only-check-if-statement-once-or-disable-code-block-after-1-check
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!