function f = ssd(h,sec)
%SSD   Convert a DFILT object to an SSD object.
%   G = SSD(H) returns a SSD filter object G given
%   any DFILT object H.
%
%   G = SSD(H,I) converts the I-th section of H to a
%   SSD filter object.

%   Author(s): R. Losada
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 2000/06/13 21:21:27 $

error(nargchk(1,2,nargin));

if nargin == 2,
    h = section(h,sec);
end

for n = 1:nsections(h),
    [a{n},b{n},c{n},d{n}] = sec2ss(section(h,n));
    newsection{n} = {a{n},b{n},c{n},d{n}};
end

connect = connection(h);

f = ssd(newsection,connect);

