User`s guide
4 Deployment Process
• addpath and rmpath in MATLAB
• Passing
-I <directory> on the mcc command line
• Passing
-N and -p directories on the mcc command line
addpath and rmpath in MATLAB
If you run MATLAB Compiler from the MATLAB prompt, you can use the
addpath and rmpath commands to modify the M ATLAB path before doing a
compilation. There are two disadvantages:
• The path is modified for the current MATLAB session only.
• If MATLAB Compiler is run outside of MATLAB, this doesn’t work unless a
savepath is done in MATLAB.
Note The path is also modified for any interactive work you are doing
in MATLAB as well.
Passing -I <directory> on the Command Line
You can use the -I o ption to add a directory to the beginning of the list of
paths to use for the current compilation. This feature is useful when you are
compiling files that are in d i r ectori es currently not on the MATLAB path.
Passing -N and -p <directory> on the Command Line
TherearetwoMATLABCompileroptionsthatprovidemoredetailed
manipulation of the path. This feature acts like a “filter” applied to the
MATLAB path for a given compilation. The first option is
-N. Passing -N on
the
mcc comm and line effectively clears the path of all directories except the
following core directories (this list is subject to change over time):
•
matlabroot/toolbox/matlab
• matlabroot/toolbox/local
• matlabroot/toolbox/compiler/deploy
• matlabroot/toolbox/compiler
4-18