path
View or change search path
Description
path
displays the current MATLAB® search path. The displayed path includes the path saved in
pathdef.m
, installed add-ons and support packages, and
folders temporarily added by addpath
.
p = path(___)
returns the MATLAB search path as a character vector. You can use this syntax with any of
the input argument combinations in the previous syntaxes.
Examples
Input Arguments
Tips
Installed Add-ons and support packages are added to the path and will be displayed when
path
is called but the folders containing the add-ons and support packages do not appear in thepathdef.m
file. You can add these folders topathdef.m
by callingsavepath
.
Alternative Functionality
As an alternative to the path
function, use the Set Path dialog
box. To open the Set Path dialog box, on the Home tab, in the
Environment section, click Set
Path.
You can also use the addpath
function to add multiple
folders to the search path.
Version History
Introduced before R2006a