| Signal Processing Toolbox™ | ![]() |
Hd = dfilt.cascade(Hd1,Hd2,...)
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 (Hd3) to the end of an existing cascade (Hd), use
Hd = addstage(Hd3)
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(Hd1,Hd2,...)

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
Hcas =
FilterStructure: Cascade
Stage(1): Direct-Form II Transposed
Stage(2): Direct-Form II Transposed
PersistentMemory: false
To view details of the first stage, use
info(Hcas.Stage(1)) Discrete-Time IIR Filter (real) ------------------------------- Filter Structure : Direct-Form II Transposed Numerator Length : 9 Denominator Length : 9 Stable : Yes Linear Phase : No
To view the states of a stage, use
Hcas.stage(1).states
You can display states for individual stages only.
dfilt, dfilt.parallel, dfilt.scalar
![]() | dfilt | dfilt.delay | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |