MATLAB Function Reference    
cd

Change working directory

Graphical Interface

As an alternative to the cd function, use the Current Directory field in the MATLAB desktop toolbar.

Syntax

Description

cd displays the current working directory.

w = cd assigns the current working directory to w.

cd('directory') sets the current working directory to directory. Use the full pathname for directory. On UNIX platforms, the character ~ is interpreted as the user's root directory.

cd('..') changes the current working directory to the directory above it.

cd directory or cd .. is the unquoted form of the syntax.

Examples

On UNIX

changes the current working directory to demos.

On Windows

changes the current working directory to demos. Then typing

changes the current working directory to matlab.

See Also

dir, path, pwd, what


  caxis cdf2rdf