function h = cas(varargin)
%CAS  Cascaded filter object constructor.
%   H = CAS(H1,H2,...)  creates a casaded filter object from
%   the filter objects H1, H2, etc.  The filter objects Hi
%   can be of any type (df2t,ssd,etc.).

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

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


% The object contains a cell array, each element of the cell array is a filter object in itself
% The cascading order is given by the order in which each filter appears in the cell array.
for n = 1:nargin,
    h.casfilt{n} = varargin{n};
    coeffs{n} = coefficients(varargin{n});
end

h.version = 1;

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