MATLAB path
ID | MCC-1 |
Title | Adapting the MATLAB and Java class path shall be avoided. |
Priority | Strongly recommended |
Severity level | 2 |
Description | Runtime changes to the MATLAB and Java class path shall be avoided. |
Rationale | In a deployed application, the MATLAB and Java paths are fixed and cannot change. See Mathworks documentation. |
avoid
Avoid calling the following functions, as they manipulate either the MATLAB path or the Java Class path:
addpath(_)
rmpath(_)
path(_)
javaaddpath(_)
javarmpath(_)
javaclasspath(_)
instead use
As a deployed application can not adapt the MATLAB or Java class path, the definition of these paths should be separated from the code that will be deployed. For example, have a separate script or function, or use MATLAB Projects, to manages the path during development.