dsp.FilterCascade
Create cascade of filter System objects
Description
The dsp.FilterCascade
object creates a multistage
System object™ that enables cascading of filter System objects and scalar gains. This object
operates similar to the cascade
function. However, the
cascade
function does not support delay as a filter stage.
You can pass the dsp.FilterCascade
System object as a stage to another dsp.FilterCascade
System object. You can also pass dsp.FilterCascade
System object as an input to the cascade
function.
When you call the object, the size, data type, and complexity of the input signal must be supported by all of the stages in the filter cascade. This object supports variable-size signals if the filter stages within the object support variable-size signals.
To filter a signal with a cascade of filters:
Create the
dsp.FilterCascade
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Alternatively, you can generate a MATLAB® function from the filter cascade object, and call that function to filter a
signal. The generated function supports C/C++ code generation. For more details, see the
generateFilteringCode
function.
Creation
Description
returns a System object, FC
= dsp.FilterCascadeFC
that has a single stage, a dsp.FIRFilter
System object with default properties.
returns a multistage System object, FC
= dsp.FilterCascade(filt1,filt2,...,filtn)FC
, with the first stage set to
filt1
, the second stage set to filt2
, and so on.
Each stage can be a filter System object or a scalar gain value.
For example, create a filter cascade that includes a lowpass filter, a highpass filter, and a gain stage.
lpFilt = dsp.LowpassFilter(StopbandFrequency=15000,... PassbandFrequency=12000); hpFilt = dsp.HighpassFilter(StopbandFrequency=5000,... PassbandFrequency=8000); gain = 2; bpFilt = dsp.FilterCascade(lpFilt,hpFilt,2);
Properties
Usage
Syntax
Description
filters input
signal y
= FC(x
)x
by using the filter cascade defined in
FC
and returns filtered output y
. The size,
data type, and complexity of the input signal must be supported by all of the stages in
the filter cascade. This object supports variable-size signals if the filter stages within
the object support variable-size signals.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2014b