Main Content

Search Path

View and change MATLAB® search path

The MATLAB search path is a subset of all the folders in the file system. MATLAB uses the search path to efficiently locate files used with MathWorks® products. For more information, see What Is the MATLAB Search Path?

Functions

addpathAdd folders to search path
rmpathRemove folders from search path
pathView or change search path
savepathSave current search path
userpathView or change default user work folder
genpathGenerate search path
pathsepSearch path separator for current platform
pathtoolOpen Set Path dialog box to view and change search path
restoredefaultpathRestore search path to factory-installed state
rehashRefresh function and file system path caches

Topics

Troubleshooting

Resolve Issue: MATLAB Did Not Appear to Successfully Set the Search Path

Troubleshoot: MATLAB Did Not Appear to Successfully Set the Search Path. If there is a problem with the search path, you cannot use MATLAB successfully.

Errors When Updating Folders on Search Path

You can encounter errors or unexpected behavior when you try to delete, rename, or move folders.

Troubleshoot Invalid or Unresponsive Windows Change Notification Handles

If MATLAB is unable to detect changes to your files and folder due to invalid or unresponsive change notification handles, you can change how MATLAB detects changes in folders.