MATLAB Function Reference Previous page   Next Page
pathdef

List of directories in MATLAB search path

Graphical Interface

As an alternative to using the pathdef.m file directly, use the Set Path dialog box. To open it, select Set Path from the File menu in the MATLAB desktop.

Syntax

Description

pathdef returns a string listing of the directories in the MATLAB search path. Use path to view each directory in pathdef.m on a separate line.

When you start a new session, MATLAB creates the search path defined in the pathdef.m file located in the MATLAB startup directory. If that directory does not contain a pathdef.m file, MATLAB uses the search path defined in $matlabroot/toolbox/local/pathdef.m.

Make changes to the path using the Set Path dialog box and addpath and rmpath. While you can edit pathdef.m directly, use caution so you do not accidentally make MATLAB supplied directories unusable. Use savepath to save pathdef.m, and to use that path in future sessions, specify the MATLAB startup directory as its location.

See Also

addpath, cd, dir, genpath, matlabroot, partialpath, path, pathsep, pathtool, rehash, restoredefaultpath, rmpath, savepath, startup, what

MATLAB Desktop Tools and Development Environment documentation topics


Previous page  path2rc pathsep Next page

© 1994-2005 The MathWorks, Inc.