What does a = b > c specify in MATLAB syntax?
이전 댓글 표시
My guess is that it is a shorthand for an if-else condition where a = 1 if b>c is true. Is this correct? If yes, can I replace a = b > c with a suitable if else condition?
채택된 답변
추가 답변 (1개)
No, it is not a shorthand for if/else.
b>c is an expression that returns a value of true() or false(). In this case, the returned value is simply assigned to a.
카테고리
도움말 센터 및 File Exchange에서 Argument Definitions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!