MATLAB Function and MATLAB Code Considerations
R2026bMATLAB Functions, MATLAB® code
Apply high-integrity guidelines for MATLAB Functions and MATLAB code.
Modeling Guidelines
| himl_0001: Usage of standardized MATLAB function headers | Use a standardized header to document the purpose and use of MATLAB functions |
| himl_0003: Complexity of user-defined MATLAB Functions | Limit the size and complexity of MATLAB function code |
| himl_0002: Strong data typing at MATLAB function boundaries | Explicitly define the complexity and type of input signals, output signals, and parameters at MATLAB function interfaces |
| himl_0004: MATLAB Code Analyzer recommendations for code generation | Use MATLAB Code Analyzer with %#codegen directive and follow code
generation recommendations |
| himl_0006: MATLAB code if / elseif / else patterns | Terminate if/elseif/else
constructs with an else statement containing meaningful
comment |
| himl_0007: MATLAB code switch / case / otherwise patterns | Include at least two case statements and an otherwise statement with a meaningful comment in switch constructs |
| himl_0008: MATLAB code relational operator data types | Use the same data type for left and right operands of relational operators |
| himl_0010: MATLAB code with logical operators and functions | Use logical data types for logical operators and logical functions |
| himl_0011: Data type and size of condition expressions | Use logical scalars for condition expressions |
| himl_0012: Usage of MATLAB functions for code generation | Restrict MATLAB code to functions supported by code generation |
| himl_0013: Limitation of built-in MATLAB Function complexity | Limit built-in MATLAB function usage that may produce overly complex generated code |
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)