Desktop Tools and Development Environment |
How MATLAB Finds the Search Path, pathdef.m
The search path is stored in the file pathdef.m
, which by default, is located in $matlabroot/toolbox/local
. You can store it in the MATLAB startup directory, and modify it for the current session or for all future sessions.
When MATLAB starts, it looks for a pathdef.m
file in its startup directory. If none is found, it uses pathdef.m
in $matlabroot/toolbox/local
. MATLAB modifies the path based on any path statements in a startup.m
file. During a session, you can save changes to the path using the Set Path dialog box or the savepath
function, and MATLAB uses the path you saved to for the remainder of the session.
If MATLAB finds a pathdef.m
in the current directory, it uses that version instead. To avoid problems, do not maintain a pathdef.m
file in a directory other than the MATLAB startup directory or $matlabroot/toolbox/local
.
Search Path | Viewing and Setting the Search Path |
© 1994-2005 The MathWorks, Inc.