Pragma required
| ID | MCC-7 |
| Title | Functions called from feval and eval constructions shall be included manually. |
| Priority | Recommended |
| Severity level | 6 |
| Description | Functions called from feval and eval constructions shall be included manually using a #function pragma to ensure that the called code is included in the archive. |
| Rationale | Portability |
avoid
[file] = feval('myfun', ...));
instead use
%#function myfun
[file] = feval('myfun', ...));
An alternative to using the pragma is the -a option for the mcc command. See MathWorks documentation.
Note: currently CC4M only highlights the calls to feval and eval, manual verification if the #function pragma is used, is still required.