scaleopts
Create an options object for second-order section scaling
Description
Examples
Create an options scaling object that contains the scaling options settings you require.
EllipI = design(fdesign.lowpass('N,Fp,Ap,Ast',10,0.5,0.5,20),... 'ellip',... FilterStructure='df1sos',... SystemObject=true)
EllipI = dsp.SOSFilter with properties: Structure: 'Direct form I' CoefficientSource: 'Property' Numerator: [5×3 double] Denominator: [5×3 double] HasScaleValues: true ScaleValues: [0.9442 1.0014 1.0170 1.6551 0.1398 1] Show all properties
opts = scaleopts(EllipI)
opts = sosReorder: 'auto' MaxNumerator: 2 NumeratorConstraint: 'none' OverflowMode: 'wrap' ScaleValueConstraint: 'unit' MaxScaleValue: 'Not used'
Input Arguments
Input filter, specified as a dsp.SOSFilter
System object.
Arithmetic type used during analysis, specified as
'double'
, 'single'
,
or 'fixed'
. The function assumes a double
precision filter when the arithmetic input is not specified and
the filter System object is in an unlocked state. The
scaleopts
function chooses the
default values of the scaling options according to the
'arithType'
value and the System object settings.
Output Arguments
You can create an fdopts.sosscaling
object,
opts
, using the scaleopts
function.
The following table lists the properties of
opts
:
Parameter | Default | Description and Valid Value |
---|---|---|
|
| Reorder section prior to scaling. Valid options are
|
|
| Maximum allowed value for numerator coefficients. |
|
| Specifies whether and how to
constrain numerator coefficient values. Options
are |
|
| Sets the way the filter handles
arithmetic overflow situations during scaling.
Valid options are |
|
| Specify whether to constrain the
filter scale values, and how to constrain them.
Valid options are |
|
| Maximum allowed scale values. The
filter applies the
|
Example: opts =
scaleopts(biquad)
Version History
Introduced in R2011aThe dsp.BiquadFilter
object issues a warning and will be
removed in a future release. Use the dsp.SOSFilter
object instead.
Update Code
This table shows how to replace the dsp.BiquadFilter
object
with the dsp.SOSFilter
object in a typical workflow.
Discouraged Usage | Recommended Replacement |
---|---|
[z,p,k] = butter(10,2000/(8000/2)); [s,g] = zp2sos(z,p,k); biquad = dsp.BiquadFilter(Structure='Direct form I',... SOSMatrix=s,ScaleValues=g); opts = scaleopts(biquad) |
[z,p,k] = butter(10,2000/(8000/2)); [s,g] = zp2sos(z,p,k); [num,den] = sos2ctf(s); sosFilter = dsp.SOSFilter(Numerator=num,... Denominator=den,... ScaleValues=g,... Structure="Direct form I"); opts = scaleopts(sosFilter) |
The dsp.BiquadFilter
object will be removed in a future
release. Use the dsp.SOSFilter
object instead.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)