Find the evaluated condition in decision
이전 댓글 표시
Can someone help me with a program to find the condition of a decision which is executed. For example
((u == 1)&&(u1==2))||(u ==2)&&u1==2)
In this decision the if the 1st condition is satisfied the second condition is not evaluated (short circuited)
답변 (1개)
Image Analyst
2020년 5월 25일
Do you mean like this?
if (u == 1) && (u1==2)
% First condition code.
elseif (u == 2) && u1 == 2 % Only evaluated if the first test fails.
end
댓글 수: 3
Ajay krishna Vasanthakumar
2020년 5월 25일
Ajay krishna Vasanthakumar
2020년 5월 25일
Ajay krishna Vasanthakumar
2020년 5월 25일
카테고리
도움말 센터 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!