showUI
R2026bShow variant configuration analysis report for a model
Description
showUI( shows the variant
configuration analysis report for a model. varConfigAnalysisObj)varConfigAnalysisObj is the
Simulink.VariantConfigurationAnalysis object used to analyze variant
configurations for the model.
Examples
This example shows how to use the Simulink.VariantConfigurationAnalysis object to analyze variant configurations programmatically.
To analyze variant configurations using Simulink® Variant Manager™, see Analyze Variant Configurations in Models Containing Variant Blocks.
Open the model slexVariantConfigurationAnalysis.
open_system("slexVariantConfigurationAnalysis"); You can provide either a list of named variant configurations or the variable groups to the creation function for the Simulink.VariantConfigurationAnalysis object. The operation returns a variant configuration analysis object for the model.
varConfigObjNamedConfig = Simulink.VariantConfigurationAnalysis("slexVariantConfigurationAnalysis",... NamedConfigurations={"VendorACtrlLinear",... "VendorACtrlNonLinear","VendorACtrlFuzzy"})
varConfigObjNamedConfig =
VariantConfigurationAnalysis with properties:
ModelName: 'slexVariantConfigurationAnalysis'
Configurations: {'VendorACtrlFuzzy' 'VendorACtrlLinear' 'VendorACtrlNonLinear'}
You can use the variant configuration analysis object to analyze the variant configurations using different functions specified in the following steps. This example analyzes the named configurations.
Get the list of active blocks in the variant configuration VendorACtrlLinear.
activeblocks = getActiveBlocks(varConfigObjNamedConfig,"VendorACtrlLinear");Get the list of blocks that are always active across all the named variant configurations that have been analyzed.
alwaysActiveBlocks = getAlwaysActiveBlocks(varConfigObjNamedConfig);
Get the list of blocks that are active in some of the analyzed variant configurations and inactive in other configurations.
blockDifferences = getBlockDifferences(varConfigObjNamedConfig);
Get the list of dependent libraries for a variant configuration.
dependentLibraries = getDependentLibraries(varConfigObjNamedConfig,"VendorACtrlNonLinear");Get the list of dependent models for a variant configuration.
dependentModels = getDependentModels(varConfigObjNamedConfig,"VendorACtrlFuzzy");Get the list of blocks that are inactive in all the named variant configurations that have been analyzed.
neverActiveBlocks = getNeverActiveBlocks(varConfigObjNamedConfig);
Get the variant condition on a block in a named variant configuration.
variantCondition = getVariantCondition(varConfigObjNamedConfig,"VendorACtrlNonLinear",... "slexVariantConfigurationAnalysis/Controller/NonLinear");
Show the variant configuration analysis report for a model after analyzing it.
showUI(varConfigObjNamedConfig);
Hide the variant configuration analysis report for a model after analyzing it.
hideUI(varConfigObjNamedConfig);
Alternatively, use this syntax to specify a list of variable groups to analyze. You can use the variant configuration analysis object functions to analyze the configurations represented by these variable groups.
varConfigObjVarGroup = Simulink.VariantConfigurationAnalysis("slexVariantConfigurationAnalysis",... VariableGroups=[struct('Name', 'VendorANonLinear',... 'VariantControls', {{'CONTROLLER', 1, 'EXTERNAL_SENSOR', 1, 'ORDER', 1, 'SATURATE', 1, 'VENDOR', 1}}),... struct('Name', 'VendorALinear',... 'VariantControls', {{'CONTROLLER', 0, 'EXTERNAL_SENSOR', 1, 'ORDER', 1, 'SATURATE', 1, 'VENDOR', 1}})]);
Input Arguments
Variant configuration analysis data, specified as a
Simulink.VariantConfigurationAnalysis object.
Version History
Introduced in R2019aStarting in R2026b, showUI is available in the Simulink®
Variant Manager™
product. In releases R2022b through R2026a, the function is available in the Variant Manager for Simulink support package. In earlier releases, the function is available in Simulink.
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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- 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)