function Dc = d2cXC(Dd,options)
% D2C conversion with state and delay consistency across array.
% Given an SS array with constant number of states and internal delays,
% D2CXC returns an SS array with the same property.

%   Copyright 2023 The MathWorks, Inc.
nsys = numel(Dd);
nx = size(Dd(1).a,1);
Dc = ltipack.ssdata.array(size(Dd));
METHOD = options.Method(1);
if METHOD=='t'
   % Tustin
   for ct=1:nsys
      Dc(ct) = d2c(Dd(ct),options);
   end
else
   % ZOH, FOH
   % Consistently eliminate E and convert
   for ct=1:nsys
      D = des2exp(Dd(ct),true);
      if ~isfinite(D)
         error(message('Control:transformation:dss2ss1'))
      end
      Dc(ct) = utInvDiscretize(D,options);
      if size(Dc(ct).a,1)>nx
         error(message('Control:transformation:d2c13'))
      end
   end
end
