The length of MATLAB functions should be limited, with a recommended limit of 60 lines of code. This restriction applies to MATLAB Functions that reside in the Simulink® block diagram and external MATLAB files with a .m extension.
If sub-functions are used, they may use additional lines of code. Also limit the length of sub-functions to 60 lines of code.
By Task > Modeling Standards for MAAB > MATLAB Functions > Check MATLAB Function block metrics