addpath Add directory to search path.
addpath DIRNAME prepends the specified directory to the current
matlabpath. Surround the DIRNAME in quotes if the name contains a
space.

addpath DIR1 DIR2 DIR3 … prepends all the specified directories to
the path.

addpath … -END appends the specified directories.
addpath … -BEGIN prepends the specified directories.
addpath … -FROZEN disables directory change detection for directories
being added and thereby conserves Windows change
notification resources (Windows only).

Use the functional form of ADDPATH, such as addpath(‘dir1′,’dir2’,…),
when the directory specification is stored in a string.

Examples

addpath c:\matlab\work
addpath /home/user/matlab

See also rmpath, path, genpath, rehash.