MATLAB: Does using MCC with the ‘-N’ flag fail to clear all directories from the include path in MATLAB 7.0.1 (R14SP1)

classescompiledfilesincludesMATLAB Compileroverloadedpathremovestandalone

I have added several directories containing my own code to my MATLAB path. When I attempt to compile a stand-alone application using the '-N' flag, files from those additional directories are still being included in my stand-alone. These files correspond to overloaded classes and objects, and are not actually needed for my particular stand-alone application. I would expect that the '-N' flag would remove these directories from the search.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This is an error within the MATLAB Compiler documentation for the MCC command. The documentation should include the following line:
In addition, the -N option retains all directories that the user has included on the path that are not under <matlabroot>/toolbox.
To remove directories from your path before compilation, you can select File -> Set Path... from the MATLAB Desktop menu, or you can use the RMPATH and ADDPATH commands at the MATLAB command line.