Main Content

na_0025: MATLAB Function header

Since R2020a

Guideline Publication

Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — Not supported

MATLAB Versions

All

Rule

Sub ID a

The MATLAB Function block shall have a descriptive header.

Information in the header can include, but is not limited to:

  • Function name

  • Description of function

  • Assumptions and limitations

  • Description of changes from previous versions

  • Lists of inputs and outputs

Custom Parameter

Not Applicable

Example
%% Function Name: NA_0025_Example_Header
%
% Description: An example of a header file
%
% Assumptions: None
%
% Inputs:
%     List of input arguments
%
% $Revision: R2020a$ 
% $Author: MathWorks Advisory Board (MAB)$
% $Date: November 20, 2019$
%---------------------------------------------------------

Rationale

Sub ID a:

  • Improves readability, model simulation, testability, and workflow.

  • Code generation may not be possible.

Verification

Adherence to this modeling guideline cannot be verified by using a Model Advisor check.

Last Changed

R2020a

Version History

Introduced in R2020a