Matlab madness

Okay, time for some Matlab annoyances.

[] is the empty matrix.
| is logical or.

[] | 1 evaluates to []. In other words,

if ( [] | 1 )
  function();
end

will never call function.

1 Response to “Matlab madness”


  1. 1 Johannes Grødem

    wtf omg ffs

Leave a Reply