Main Content

validstructures

Structures for specification object with design method

Description

filtstruct = validstructures(designSpecs,'Systemobject',true) returns a structure of cell arrays, filtstruct, which contains a set of valid filter structures for the filter specification object designSpecs. When you set 'Systemobject' to true, validstructures returns a list of structures that support filter System objects. Each field in filtstruct lists a set of filter structures for the design method specified.

example

filtstruct = validstructures(designSpecs,method,'Systemobject',true) returns the valid structures for the filter specification object, designSpecs, and the design method, method, in a cell array of character vectors.

Examples

collapse all

Design a default lowpass filter specification object. Use the validstructures function to obtain valid design methods and structures in a structure array. Display the field names to see all valid design methods. Display the valid filter structures for the equiripple field.

D = fdesign.lowpass;
filtstruct = validstructures(D,'SystemObject',true);

fn = fieldnames(filtstruct)
fn = 8x1 cell
    {'butter'    }
    {'cheby1'    }
    {'cheby2'    }
    {'ellip'     }
    {'equiripple'}
    {'ifir'      }
    {'multistage'}
    {'kaiserwin' }

strs = eval(['filtstruct.' fn{5}])
strs = 1x3 cell
    {'dffir'}    {'dffirt'}    {'dfsymfir'}

Create a highpass filter of order 50 with a 3-dB frequency of 0.2. Obtain the available structures for a Butterworth design.

D = fdesign.highpass('N,F3dB',50,0.2);
C = validstructures(D,'butter','SystemObject',true)
C = 1x6 cell
    {'df1sos'}    {'df2sos'}    {'df1tsos'}    {'df2tsos'}    {'cascadeallpass'}    {'cascadewdfallpass'}

Input Arguments

collapse all

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

collapse all

Available filter structures, returned as a structure with the fields determined by the input filter specification object, designSpecs, and the chosen design method.

Data Types: struct

Version History

Introduced in R2009a