function sys = dss2ss_(sys,varargin)
% Descriptor to explicit conversion

% Copyright 2023 The MathWorks, Inc.
D = sys.Data_;
if nargin<2
   for ct=1:numel(D)
      [isp,D(ct)] = isproper(D(ct),true);
      if ~isp
         error(message('Control:transformation:dss2ss2'))
      end
   end
else
   % Consistent reduction
   for ct=1:numel(D)
      D(ct) = des2exp(D(ct),true);
      if ~isfinite(D(ct))
         error(message('Control:transformation:dss2ss1'))
      end
   end
end
sys.Data_ = D;