Pragma required

IDMCC-7
TitleFunctions called from feval and eval constructions shall be included manually.
PriorityRecommended
Severity level6
DescriptionFunctions 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.
RationalePortability

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.