MRG: fix matlab output type of logical array

Fixes output type for logical arrays for MATLAB.

MATLAB apparently insists that logical arrays are in output type UINT8.