diff --git a/inst/@sym/isempty.m b/inst/@sym/isempty.m index cc4ebbe90..93f12af25 100644 --- a/inst/@sym/isempty.m +++ b/inst/@sym/isempty.m @@ -41,6 +41,12 @@ function r = isempty(x) + % special case + if (strcmp(char(x), 'EmptySet()')) + r = true; + return; + end + d = size(x); % Octave can have n x 0 and 0 x m empty arrays @@ -92,3 +98,8 @@ %! assert (isempty (A)) %! A = sym('A', [n 0]); %! assert (isempty (A)) + +%!test +%! % special case for empty set +%! e = finiteset(); +%! assert (isempty (e))