MATLAB Code Analyzer Findings Details
R2026bMetric ID
modeldesign.ComplianceAnalysis[slcomp.MATLABCodeAnalyzerFindingsDetails]
Description
This metric returns detailed MATLAB® Code Analyzer findings for each unit in your project. The metric identifies which MATLAB elements within a model have Code Analyzer issues and reports the number of findings by severity. Use this metric to locate specific MATLAB elements that require attention within each unit.
For more information about the MATLAB Code Analyzer, see Check Code for Errors and Warnings Using the Code Analyzer.
Supported Artifacts
This metric collects metric results for Units in the project. To control what the dashboard classifies as a unit, see Categorize Models in Hierarchy as Components or Units.
Collection
To collect data for this metric, execute the metric engine with the metric ID.
metric_engine = metric.Engine;
results = execute(metric_engine,"modeldesign.ComplianceAnalysis[slcomp.MATLABCodeAnalyzerFindingsDetails]")View the metric result values for a specific model component.
results(1).Value results(1).ScopeAlias
Results
The metric returns an array of objects, one for each unit in
the project. Use the metric.ResultValue property of the metric result object to view
the metric result values. Use the ScopeId and
ScopeAlias properties to identify which unit the result
belongs to.
The ScopeAlias property returns the name of the model
component.
The Value property returns missing when the model
component has no MATLAB Code Analyzer findings. When findings exist, the Value
property returns a structure with these fields:
MatlabElement— Structure that identifies the MATLAB element that has findings, with fields:Alias— Name of the MATLAB element, such as the name of a MATLAB Function blockURI— Digital thread URI that uniquely identifies the element in the project
Errors— Number of error-level findingsWarnings— Number of warning-level findingsInfo— Number of informational findingsTotal— Total number of Code Analyzer findings, equal to the sum ofErrors,Warnings, andInfo
See Also
Model Design Metrics | Model Maintainability Metrics | MATLAB Code Analyzer Findings per Design Layer