Pfadsuche
Der MATLAB-Suchpfad ist eine Untergruppe aller Ordner im Dateisystem. MATLAB nutzt den Suchpfad, um effizient Dateien zu lokalisieren, die mit MathWorks®-Produkten verwendet werden. Weitere Informationen finden Sie unter What Is the MATLAB Search Path?.
Funktionen
addpath | Hinzufügen von Ordnern zum Suchpfad |
rmpath | Remove folders from search path |
path | View or change search path |
savepath | Save current search path |
userpath | View or change default user work folder |
genpath | Generate search path |
pathsep | Search path separator for current platform |
pathtool | Open Set Path dialog box to view and change search path |
restoredefaultpath | Restore search path to factory-installed state |
rehash | Refresh function and file system path caches |
Themen
- What Is the MATLAB Search Path?
The search path, or path is a subset of all the folders in the file system that MATLAB uses to locate files efficiently.
- Change Folders on Search Path
Interactively add and remove folders, and change the order of folders on the search path, for the current MATLAB session and for future MATLAB sessions.
- Use Search Path with Different MATLAB Installations
The default search path changes for each MATLAB version because the default folders that come with the products change.
- Add Folders to the MATLAB Search Path at Startup
The
startup.m
file is for specifying startup options. Add folders to the search path by includingaddpath
statements instartup.m
. - Assign userpath as Startup Folder (Macintosh or UNIX)
Assign the
userpath
folder as the startup folder on Macintosh or UNIX® platforms. - Dateien und Ordner, auf die MATLAB zugreift
Wenn Sie keinen Pfad zu einer Datei angeben, sucht MATLAB im aktuellen Ordner oder im Suchpfad nach der Datei. Funktionen im aktuellen Ordner haben Vorrang vor Funktionen mit demselben Dateinamen, die sich irgendwo im Suchpfad befinden.
- Toolbox Path Caching in MATLAB
For performance reasons, MATLAB caches
matlabroot
folder information across sessions.
Fehlersuche
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.