| MATLAB Function Reference | Search  Help Desk |
| addpath | Examples See Also |
Add directories to MATLAB's search path
Syntax
addpath('directory')addpath('dir1','dir2','dir3',...)addpath(...,'-flag')
Description
addpath('directory')
prepends the specified directory to MATLAB's current search path.
addpath('dir1','dir2','dir3',...)
prepends all the specified directories to the path.
addpath(...,'-flag')
either prepends or appends the specified directories to the path depending the value of flag:0 or begin |
Prepend specified directories |
1 or end |
Append specified directories |
Examples
path
MATLABPATH
c:\matlab\toolbox\general
c:\matlab\toolbox\ops
c:\matlab\toolbox\strfun
addpath('c:\matlab\myfiles')
path
MATLABPATH
c:\matlab\myfiles
c:\matlab\toolbox\general
c:\matlab\toolbox\ops
c:\matlab\toolbox\strfun
See Also
path, rmpath