23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

addpath<br />

2addpath<br />

Purpose Add directories to <strong>MATLAB</strong> search path<br />

Graphical<br />

Interface<br />

2-40<br />

As an alternative to the addpath function, use the Set Path dialog box. To open<br />

it, select Set Path from the File menu in the <strong>MATLAB</strong> desktop.<br />

Syntax addpath('directory')<br />

addpath('dir','dir2','dir3' ...)<br />

addpath('dir','dir2','dir3' ...'-flag')<br />

addpath dir1 dir2 dir3 ... -flag<br />

Description addpath('directory') prepends the specified directory to <strong>MATLAB</strong>’s current<br />

search path, that is, it adds them to the front of the path. Use the full pathname<br />

for directory.<br />

addpath('dir','dir2','dir3' ...) prepends all the specified directories to<br />

the path. Use the full pathname for each dir.<br />

addpath('dir','dir2','dir3' ...'-flag') either prepends or appends<br />

the specified directories to the path depending on the value of flag.<br />

flag Argument Result<br />

0 or begin Prepend specified directories<br />

1 or end Append specified directories<br />

addpath dir1 dir2 dir3 ... -flag is the unquoted form of the syntax.<br />

Examples For the current path, viewed by typing path,<br />

<strong>MATLAB</strong>PATH<br />

c:\matlab\toolbox\general<br />

c:\matlab\toolbox\ops<br />

c:\matlab\toolbox\strfun<br />

you can add c:\matlab\mymfiles to the front of the path by typing<br />

addpath('c:\matlab\mymfiles')

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!