function tf = isemptys(arg)
% tf = isemptys(arg)
% arg is structure, cellarray, double, or character
% tests if argument is empty (by whatever method is necessary)

if isstruct(arg)
   if length(fieldnames(arg)) == 0 | length(arg) == 0 | isempty(arg)
      tf = logical(1);
   else
      tf = logical(0);
   end
else
   if isempty(arg)
      tf = logical(1);
   else
      tf = logical(0);
   end
end

