function [boo,sys] = isproper_(sys,ExplicitFlag,varargin)
% Checks properness

% Copyright 1986-2014 The MathWorks, Inc.
D = sys.Data_;
nD = numel(D);
if nD==1
   [boo,sys.Data_] = isproper(D,ExplicitFlag);
else
   if nargout>1
      error(message('Control:analysis:isproper1'))
   end
   if nargin>2
      % Elementwise check
      boo = true(size(D));
      for ct=1:nD
         boo(ct) = isproper(D(ct));
      end
   else
      boo = true;
      for ct=1:nD
         if ~isproper(D(ct))
            boo = false;  break
         end
      end
   end
end