This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Restore search path to its factory-installed state




restoredefaultpath restores the MATLAB® search path to its 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. For more information, see What Is the MATLAB Search Path?

    Note:   restoredefaultpath is intended only for situations where MATLAB is experiencing startup problems due to a corrupt search path. For general search-path clean up, use the rmpath function or the Set Path dialog box.

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.


As an alternative to the restoredefaultpath function, use the rmpath function or use the pathtool function to open the Set Path dialog box.

Introduced before R2006a

Was this topic helpful?