function h = par(varargin)
%PAR  Parallel filter object constructor.
%   H = PAR(H1,H2,...)  creates a parallel filter object from
%   the filter objects H1, H2, etc.  The filter objects Hi
%   can be of any type (df2t,dss,etc.).


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

if nargin<1
  % Create a 1/1 df2t
  h.parfilt = {df2t};
end

% The object contains a cell array, each element of the cell array is a filter object in itself
% All objects are assumed to be in parallel.
for n = 1:nargin,
    h.parfilt{n} = varargin{n};
    coeffs{n} = coefficients(varargin{n});
end

h.version = 1;

h = class(h,'par',dfilt(coeffs,'par'));
