diff --git a/+types/+untyped/Set.m b/+types/+untyped/Set.m index 0fb36837..22245144 100644 --- a/+types/+untyped/Set.m +++ b/+types/+untyped/Set.m @@ -71,6 +71,11 @@ cnt = obj.Map.Count; end + % overloads isemty + function tf = isempty(obj) + tf = obj.Count == 0; + end + %overloads size(obj) function varargout = size(obj, dim) if nargin > 1 @@ -80,7 +85,7 @@ varargout{1} = obj.Count; end else - if nargout == 1 + if nargout == 0 || nargout == 1 varargout{1} = [obj.Count, 1]; else varargout = num2cell( ones(1, nargout) );