function cleanList=excludesystems(z,rawList)
%EXCLUDESYSTEMS removes non-reportable systems from a list
%   OUTLIST=EXCLUDESYSTEMS(ZSLMETHODS,INLIST)


%   Copyright (c) 1997-2000 by The MathWorks, Inc.
%   $Revision: 1.2 $  $Date: 2000/03/23 19:38:18 $

if ~iscell(rawList)
   rawList={rawList};
end

allBadTypes={
   {'MaskType','Stateflow'}
};

badList={};

for i=1:length(allBadTypes)
   try
      thisBad=find_system(rawList,...
         'SearchDepth',0,...
         allBadTypes{i}{:});
   catch
      thisBad={};
   end
   badList=[badList;thisBad];
end

cleanList=setdiff(rawList,badList);

