I just stumbled on another reason to dislike Matlab: the stupid inconsistency of the short-circuit behavior of the elementwise logical operators: the statement
fun(2) | fun(9999)
does not short-circuit, so both fun(2)
and fun(9999)
are executed,
but when used in an if
or while
expression like
if …