Cascade of discrete-time filters
Hd = dfilt.cascade(Hd1,Hd2,...) returns a discrete-time filter, Hd, of type cascade, which is a serial interconnection of two or more dfilt filters, Hd1, Hd2, etc. Each filter in a cascade is a separate stage.
To add a filter (Hd1) to the end of an existing cascade (Hd), use
and to reorder the filters in a cascade, use the stage indices to indicate the desired ordering, such as.
Hd.stage = Hd.stage([1,3,2]);
You can also use the nondot notation format for calling a cascade:
Cascade a lowpass filter and a highpass filter to produce a bandpass filter:
[b1,a1]=butter(8,0.6); % Lowpass [b2,a2]=butter(8,0.4,'high'); % Highpass H1=dfilt.df2t(b1,a1); H2=dfilt.df2t(b2,a2); Hcas=dfilt.cascade(H1,H2) % Bandpass-passband .4-.6
To view details of the first stage, use
To view the states of a stage, use
You can display states for individual stages only.