checkAvoidFunctions

Checks if the code depends on functions that should be avoided. For example: using eval is often discouraged because it can result in code that is unreliable and difficult to read. Other reasons to discourage use of certain functions and keywords are to prevent system damage or to ensure automation or code generation. You can also specify entire MATLAB folders to avoid using functions from.

Configurable parameters

  • AvoidFunctions (list): A list of functions and keywords that are to be avoided. This can include user-defined functions if necessary.

  • AvoidFolders (list): A list of folders in the MATLAB installation folder whose functions to avoid using. Provide the folders with respect to <matlabroot>\toolbox where matlabroot is the installation folder of the current MATLAB session that is also returned by calling matlabroot(). For example, configuring the value matlab\graphics for this parameter will make this check report calls to any function in the folder

    C:\Program files\MATLAB\R2020b\toolbox\matlab\graphics.

Exemption tag: %@ok<AVFUN>