designoptions
Show all options available for specified design
Description
returns all design options available for a specification object,
options = designoptions(designSpecs,method)designSpecs, using a particular design method,
method.
Examples
Design a Butterworth filter with lowpass and highpass frequency responses. The filter design procedure is:
Specify the filter design specifications using a
fdesignfunction.Pick a design method provided by the
designmethodsfunction.To determine the available design options to choose from, use the
designoptionsfunction.Design the filter using the
designfunction.
Lowpass Filter
Construct a default lowpass filter design specification object using fdesign.lowpass.
designSpecs = fdesign.lowpass
designSpecs =
lowpass with properties:
Response: 'Lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4×1 cell}
NormalizedFrequency: 1
Fpass: 0.4500
Fstop: 0.5500
Apass: 1
Astop: 60
Determine the available design methods using the designmethods function. To design a Butterworth filter, pick butter.
designmethods(designSpecs,SystemObject=true)
Design Methods that support System objects for class fdesign.lowpass (Fp,Fst,Ap,Ast): butter cheby1 cheby2 ellip equiripple ifir kaiserwin multistage
While designing the filter, you can specify additional design options. View a list of the options using the designoptions function. This function also shows the default design options the filter uses.
designoptions(designSpecs,'butter',SystemObject=true)ans = struct with fields:
FilterStructure: {'df1sos' 'df2sos' 'df1tsos' 'df2tsos' 'cascadeallpass' 'cascadewdfallpass'}
SOSScaleNorm: 'ustring'
SOSScaleOpts: 'fdopts.sosscaling'
MatchExactly: {'passband' 'stopband'}
DefaultFilterStructure: 'df2sos'
DefaultMatchExactly: 'stopband'
DefaultSOSScaleNorm: ''
DefaultSOSScaleOpts: [1×1 fdopts.sosscaling]
Use the design function to design the filter. Pass 'butter' and the specifications given by variable designSpecs, as input arguments. Specify the 'matchexactly' design option to 'passband'.
lpFilter = design(designSpecs,'butter',matchexactly='passband',SystemObject=true)
lpFilter =
dsp.SOSFilter with properties:
Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [13×3 double]
Denominator: [13×3 double]
HasScaleValues: true
ScaleValues: [0.4095 0.3669 0.3330 0.3059 0.2841 0.2666 0.2525 0.2414 0.2328 0.2263 0.2219 0.2193 0.4674 1]
Show all properties
Visualize the frequency response of the designed filter.
filterAnalyzer(lpFilter)

Highpass Filter
Construct a highpass filter design specification object using fdesign.highpass. Specify the order to be 7 and the 3 dB frequency to be radians/sample.
designSpecs = fdesign.highpass('N,F3dB',7,.6)designSpecs =
highpass with properties:
Specification: 'N,F3dB'
Response: 'Highpass'
Description: {2×1 cell}
NormalizedFrequency: 1
FilterOrder: 7
F3dB: 0.6000
Determine the available design methods. To design a Butterworth filter, pick butter.
designmethods(designSpecs,SystemObject=true)
Design Methods that support System objects for class fdesign.highpass (N,F3dB): butter maxflat
While designing the filter, you can specify additional design options. View a list of the options using the designoptions function. This function also shows the default design options the filter uses.
designoptions(designSpecs,'butter',SystemObject=true)ans = struct with fields:
FilterStructure: {'df1sos' 'df2sos' 'df1tsos' 'df2tsos' 'cascadeallpass' 'cascadewdfallpass'}
SOSScaleNorm: 'ustring'
SOSScaleOpts: 'fdopts.sosscaling'
DefaultFilterStructure: 'df2sos'
DefaultSOSScaleNorm: ''
DefaultSOSScaleOpts: [1×1 fdopts.sosscaling]
To design the Butterworth filter, use the design function and specify 'butter' as an input. Set 'FilterStructure' to 'cascadeallpass'.
hpFilter = design(designSpecs,'butter',FilterStructure='cascadeallpass',SystemObject=true)
hpFilter =
dsp.CoupledAllpassFilter with properties:
Structure: 'Minimum multiplier'
PureDelayBranch: 0
AllpassCoefficients1: {2×1 cell}
AllpassCoefficients2: {2×1 cell}
Gain1: '-1'
Gain2: '1'
Visualize the highpass frequency response.
filterAnalyzer(hpFilter)

Design a direct-form I notching filter that has a filter order of 6, center frequency of 0.5, quality factor of 10, and a passband ripple of 1 dB.
Create a notch filter design specification object using the fdesign.notch function and specify these design parameters.
notchSpecs = fdesign.notch('N,F0,Q,Ap',6,0.5,10,1);Design the notch filter using the design function. The resulting filter is a dsp.SOSFilter System object™. For details on how to apply this filter on streaming data, refer to dsp.SOSFilter.
notchFilt = design(notchSpecs,SystemObject=true)
notchFilt =
dsp.SOSFilter with properties:
Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [3×3 double]
Denominator: [3×3 double]
HasScaleValues: true
ScaleValues: [0.7722 0.7722 1.3597 1]
Show all properties
Visualize the frequency response of the designed filter.
filterAnalyzer(notchFilt)

Input Arguments
Filter specification object, specified as one of the fdesign functions.
Design method, specified as a character vector. You can pick a design method from
the available methods given by the designmethods function.
Output Arguments
Available design options, returned as a structure with the fields determined by the
input filter specification object, designSpecs, and the design
method chosen.
Version History
Introduced in R2007b
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)