This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Restore search path to factory-installed state




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.


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 Path Unsuccessfully Set at Startup.

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.

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.

Introduced before R2006a