• Uncategorised


path Get/set search path.
PATH, by itself, prettyprints MATLAB’s current search path. The
initial search path list is set by PATHDEF, and is perhaps
individualized by STARTUP.

P = path returns a string containing the path in P.
path(P) changes the path to P. path(PATH) refreshes MATLAB’s
view of the directories on the path, ensuring that any changes
to non-toolbox directories are visible.

path(P1,P2) changes the path to the concatenation of the two path
strings P1 and P2. Thus path(PATH,P) appends a new directory to
the current path and path(P,PATH) prepends a new path. If P1 or
P2 are already on the path, they are not added.

For example, the following statements add another directory
to MATLAB’s search path on various operating systems:





See also what, cd, dir, addpath, rmpath, genpath, rehash

You may also like...