0001 function emptyOrLogical(x) 0002 if isempty(x) 0003 return; 0004 end 0005 validateattributes(x, {'logical'}, {'scalar'}); 0006 end