Main Content

Check if/elseif/else patterns in MATLAB Function blocks

Check ID: mathworks.hism.himl_0006

Description

This check identifies the if/elseif/else patterns without appropriate else conditions in embedded MATLAB code.

Available with Simulink® Check™.

Results and Recommended Actions

ConditionRecommended Action
Inappropriate if/elseif/else patterns are present in the embedded MATLAB code.For every if/elseif/else pattern, add an else statement that includes at least one meaningful comment.

Capabilities and Limitations

  • This check only analyzes the functions that are directly referenced by the Simulink model.

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

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

See Also