Contenido principal

La traducción de esta página aún no se ha actualizado a la versión más reciente. Haga clic aquí para ver la última versión en inglés.

showFilters

Show or hide filters in Filter Analyzer app

Desde R2024a

Descripción

showFilters(fa,showit) shows or hides all filters on the active display of the Filter Analyzer app fa depending on whether showit is true or false, respectively. If showit is true and there is no display, the app adds one and plots the filters on it. If you want to show only a subset of the filters, use FilterNames to specify which ones.

ejemplo

showFilters(___,Name=Value) specifies options using name-value arguments in addition to the input arguments from the previous syntax. You can choose the filters to show or hide and the display in which you want to show them or hide them.

ejemplo

dispnum = showFilters(___) returns the identification number of the new display, if showFilters adds one.

Ejemplos

contraer todo

Design two lowpass filters and display their magnitude responses in Filter Analyzer.

d1 = designfilt("lowpassiir", ...
    PassbandFrequency=0.45,StopbandFrequency=0.55);
d2 = designfilt("lowpassiir", ...
    PassbandFrequency=0.25,StopbandFrequency=0.35);
fa = filterAnalyzer(d1,d2,FilterNames=["LP1" "LP2"]);

Add a display to analyze phase response. Set the number of NFFT points to 1024. Show the filters.

phaseDispNum = addDisplays(fa,Analysis="phase",NFFT=1024);
showFilters(fa,true, ...
    FilterNames=["LP1" "LP2"],DisplayNums=phaseDispNum)

Remove the filter plots from the phase response display.

showFilters(fa,false,DisplayNums=phaseDispNum)

Argumentos de entrada

contraer todo

Filter Analyzer app handle, specified as a filterAnalyzer object.

Show option, specified as a logical 0 (false) or 1 (true).

Tipos de datos: logical

Argumentos de par nombre-valor

contraer todo

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Ejemplo: FilterNames=["LP" "HP"],SampleRates=[150 3e3]

Displays on which to plot filters, specified as a vector of display numbers. If you do not specify this argument, Filter Analyzer uses the active display. Use display identification numbers to target displays when using other Filter Analyzer functions. Identification numbers appear above the plotting area of the app, on the tabs that correspond to the different displays.

Ejemplo: [1 4]

Tipos de datos: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Filter names, specified as a string vector. Filter names are the names that identify the different filters in the app Filters table. Use this argument to specify which filters you want to appear in the selected displays.

Ejemplo: ["LPbutter" "LPelliptic"]

Tipos de datos: char | string

Output Arguments

contraer todo

Display identification number, returned as an integer or vector of integers. If showFilters adds more than one display, dispnum is a vector. Use display identification numbers to target displays when using other Filter Analyzer functions. Identification numbers appear above the plotting area of the app, on the tabs that correspond to the different displays.

Historial de versiones

Introducido en R2024a