Bottom Line on Logical
I just posted a blog on logical operator behavior in MATLAB and I want to be clear about the bottom line.
Use the newer MATLAB operators || and &&, in the context of expressions for if and while. The newer operators always short-circuit, not just in if and while expressions. The newer operators force you to be clear about your intention with respect to matrix expressions (including empty ones) and you choose how to reduce the array expressions to scalar ones that are unambiguous.
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.