Add support for logical/bool matrices

Simple additions with a bit of MATLAB-recommended beautification.