![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177801/image.png)
Absolute value of a difference in Simulink if block
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to use the following inequality in my if block, which has two inputs: (u1 > 37) & (abs(u1 - u2) <= 1) However, I keep getting syntax errors. What is the correct way to write the absolute value in the Simulink if block?
댓글 수: 0
답변 (1개)
Jacob Ziesenis
2017년 8월 14일
I am not sure what exactly you mean with an if-Block, but i would solve that problem in the following way:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177801/image.png)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!