restoredefaultpath
Restore search path to factory-installed state
Syntax
Description
restoredefaultpath
resets the MATLAB® search path to the factory-installed state. By default, the search
path includes the MATLAB
userpath
folder, the folders defined as part of the
MATLABPATH
environment variable, and the folders provided
with MATLAB and other MathWorks® products.
Note
restoredefaultpath
is intended only for situations
where MATLAB is experiencing startup problems due to a corrupt search path.
For general search path cleanup, see Alternative Functionality.
If MATLAB fails to initialize properly on startup, then call both
restoredefaultpath
and matlabrc
. For
more details, see Resolve Issue: MATLAB Did Not Appear to Successfully Set the Search Path.
MATLAB does not support issuing restoredefaultpath
from
a UNC path name. Doing so might result in MATLAB being unable to find files on the search path. If you do use
restoredefaultpath
from a UNC path name, restore the
expected behavior by changing the current folder to an absolute path and then
reissuing the restoredefaultpath
command.
Limitations
restoredefaultpath
is not supported in MATLAB Online™.
Tips
Support packages, add-ons, and other special folders are removed from the path by
restoredefaultpath
.
Alternative Functionality
For general search path cleanup, use the rmpath
function or the Set Path dialog box. To open the Set Path dialog
box, go to the Home tab and in the Environment
section, click Set Path. Alternatively, use the pathtool
function.
Version History
Introduced before R2006a