Main Content

setAnalysisOptions

Set analysis options of displays in Filter Analyzer app

Since R2024a

Description

setAnalysisOptions(fa,opts) sets the analysis options for the active display in the Filter Analyzer app fa to the options specified in opts.

example

setAnalysisOptions(fa,Name=Value) sets display analysis options using name-value arguments. For a list of available options, see the properties of the filterAnalysisOptions object. Options specified this way apply to all the displays that you specify. If you want to specify different options for different displays, use filterAnalysisOptions objects.

You cannot mix this syntax with the previous syntax. In other words, you cannot specify options using name-value arguments and filterAnalysisOptions objects simultaneously.

setAnalysisOptions(___,DisplayNums=dispnums) sets the analysis options for the displays specified in dispnums.

Examples

collapse all

Design two lowpass filters and display them in Filter Analyzer.

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

Set the analysis options by adding the group delay response as an overlaid analysis and display responses over a two-sided frequency range using 1024 FFT points.

opts = filterAnalysisOptions("magnitude","groupdelay");
opts.FrequencyRange = "twosided";
opts.NFFT = 1024;
setAnalysisOptions(fa,opts)

Input Arguments

collapse all

Filter Analyzer app handle, specified as a filterAnalyzer object.

Filter analysis options, specified as a filterAnalysisOptions object or a cell array. To construct opts, use the filterAnalysisOptions function. Alternatively, you can get the options from the active display or another display by using the getAnalysisOptions function and modify them manually.

If dispnums has more than one element:

  • Use a single filterAnalysisOptions object to apply the same options to all the specified displays.

  • Use a cell array of filterAnalysisOptions objects to apply different options to each display. The cell array must have the same number of elements as dispnums.

Displays for which to modify analysis options, specified as an integer or a vector of integers. If you do not specify this argument, Filter Analyzer modifies the analysis options in the active display. Identification numbers appear above the plotting area of the app, on the tabs that correspond to the different displays.

Example: [1 5]

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Version History

Introduced in R2024a