This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Working with the Static Code Metrics Report

You can use the information in the Static Code Metrics Report to assess the generated code and make model changes before code implementation in your target IDE.

Before starting, you must familiarize yourself with potential code limitations of your IDE. For example, some IDEs have limits on the number of variables or lines of code in a function block.

For detailed instructions on generating the report, see Generate a Static Code Metrics Report.

Workflow for Static Code Metrics Report

This is the basic workflow for using the Static Code Metrics Report with your model.

Report Contents

The Static Code Metrics Report is divided into the following sections:

  • File Information: Reports high-level information about generated files, such as lines and lines of code.

  • Global Variables: Reports information about global variables defined in the generated code.

  • Global Constants: Reports information about global constants defined in the generated code.

  • Function Block Information: Reports a table of metrics for each function block generated from your model.

Function Block Information

You can use the information in the Function Block Information table to assess the generated code before implementation in your IDE. The leftmost column of the table lists function blocks with hyperlinks. Clicking a function block name leads you to the function block location in the generated code. From here, you can trace from the code to the model. For more information, see Trace from Code to Model.