Main Content

Check default/else case in Switch Case blocks and If blocks

Check ID: mathworks.jmaab.jc_0656

Guideline: jc_0656: Usage of Conditional Control blocks

Description

Checks if the default/else case option is enabled for Switch Case and If blocks.

This check requires a Simulink® Check™ license.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline provides only one sub ID.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Improper usage of Switch Case and If blocks. Set the default/else case option in Switch Case and If blocks to on.

Capabilities and Limitations

  • Runs on library models.

  • 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.

  • Allows exclusions of blocks and charts.

See Also