Main Content

Check the number of function calls in MATLAB Function blocks

Check ID: mathworks.maab.na_0017

Guideline:

Description

Checks whether number of function calls in MATLAB® Function blocks is less than the set threshold. By default, the limit is set to three.

This check requires a Simulink® Check™ license.

Check Parameterization

This Model Advisor check is not applicable for JMAAB modeling guidelines.

This check does not include sub-checks

For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — a

  • JMAAB — a

You can customize the function call levels threshold by using the input parameter Function Call Level from the Model Advisor Configuration Editor.

  1. Open the Model Configuration Editor and search for check ID na_0017.

  2. Enter the desired function call level to set in the Function Call Level field.

    By default, this parameter is set to 3.

  3. Click Apply and save the configuration.

Results and Recommended Actions

ConditionRecommended Action
Number of function calls in MATLAB Function blocks is greater than the set threshold. By default, the set threshold is three. The set threshold can be modified by using the input parameter Function Call Level in the configuration editor.Reduce the number of function calls from MATLAB Function blocks to be less than the set threshold.

Capabilities and Limitations

  • This check also implements the JMAAB v6.0 guideline: mp_0025

  • Recursive function calls are only counted once.

  • Inline class methods are not analyzed.

  • Runs on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

See Also