Main Content

MATLAB Code Analyzer Warnings

Metric ID

Metric ID: mathworks.metrics.MatlabCodeAnalyzerWarnings


Metric Type: Compliance

Use this metric to calculate the number of MATLAB® code analyzer warnings from MATLAB code in the model. This metric is available with Simulink® Check™.

The slmetric.metric.AggregationMode property setting is Sum.

Computation Details

The metric:

  • Analyzes MATLAB code in MATLAB Function blocks

  • Analyzes MATLAB functions in Stateflow® charts

  • Runs on library models

  • Analyzes content in masked subsystems

  • If specified, analyzes content of library-linked blocks and referenced models

  • Does not analyze external MATLAB code files


For this metric, instances of slmetric.metric.Result provide the following results:

  • Value: Number of MATLAB code analyzer warnings

  • AggregatedValue: Number of MATLAB code analyzer warnings aggregated for a component and subcomponents.

  • Measures: Not applicable.

For more information on code analyzer warnings, see Check Code for Errors and Warnings Using the Code Analyzer.

See Also

Related Topics