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.

setLegendStrings

Append legend strings for filters in Filter Analyzer app

Desde R2024a

Descripción

setLegendStrings(fa,strs) appends strings to the default legend strings for all the filters plotted in the active display in the Filter Analyzer app fa.

ejemplo

setLegendStrings(fa,strs,Name=Value) specifies additional options using name-value arguments. You can specify the filters whose legend strings you want to modify and the display in which to show the modified legend strings.

Ejemplos

contraer todo

Design two lowpass filters. Start a Filter Analyzer session and display the filters.

d1 = designfilt("lowpassfir", ...
    PassbandFrequency=0.45,StopbandFrequency=0.55);
d2 = designfilt("lowpassfir", ...
    PassbandFrequency=0.25,StopbandFrequency=0.35);
fa = filterAnalyzer(d1,d2);

Update the legend strings of the filters, calling them "LowpassFilter1" and "LowpassFilter2".

setLegendStrings(fa,["LowpassFilter1" "LowpassFilter2"])

Argumentos de entrada

contraer todo

Filter Analyzer app handle, specified as a filterAnalyzer object.

Legend strings, specified as a vector of strings. The vector must have a number of elements equal to the number of filters plotted in the display of interest or to the number of names specified in FilterNames. By default, the app sets legend strings to the filter names.

Ejemplo: ["0.45 passband" "0.25 passband"]

Tipos de datos: char | string

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 modify legends, specified as a vector of display numbers. If you do not specify this argument, Filter Analyzer modifies the legends in the active display.

Ejemplo: [1 4]

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

Filter names, specified as a string vector. setLegendStrings updates only the filters whose names are specified in FilterNames. Filter names are the names that identify the different filters in the app Filters table.

Ejemplo: ["LPbutter" "LPelliptic"]

Tipos de datos: char | string

Historial de versiones

Introducido en R2024a