Simulink.VariantManager.analyzeModel
Syntax
Description
A variant configuration defines a specific combination of variant choices within a
variant model, allowing you to activate a particular variant throughout the model hierarchy.
The Simulink.VariantManager.analyzeModel function enables you to analyze
multiple variant configurations for a model, helping you to identify the common and differing
model elements across configurations.
You can use this function to analyze named variant configurations that have been created for a model, or to perform an analysis after specifying values for variant control variables. The function also generates a variant analysis report that allows you to:
Determine whether all variant choices are activated at least once and whether the model is covered completely for simulation and code generation.
Determine whether the active, implemented model differs between variant configurations.
Identify dependent model artifacts, such as referenced models and libraries, that are used by specific variant configurations.
To access this functionality from Variant Manager for Simulink®, use the Variant Analyzer tool. For an overview, see Analyze Variant Configurations in Models Containing Variant Blocks.
Simulink.VariantManager.analyzeModel(
analyzes the variant model modelName,Name=Value)modelName using the options specified by
name-value arguments, and then opens the variant analysis report. You can use the options to
specify which configurations to analyze, and whether to display or hide the report after the
analysis.
For more information on the variant analysis report, see Explore Variant Analysis Report.
opens
the variant analysis report and returns a varConfigAnalysisObj = Simulink.VariantManager.analyzeModel(modelName,Name=Value)Simulink.VariantConfigurationAnalysis object after the analysis. You can call
functions of this object to perform further operations on the analysis results.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Version History
Introduced in R2026a