MATLAB Function Reference
  Go to function:
    Search    Help Desk 
cd    Examples   See Also

Change working directory

Syntax

Description

cd, by itself, prints out the current directory.

cd directory sets the current directory to the one specified. On UNIX platforms, the character ~ is interpreted as the user's root directory.

cd .. changes to the directory above the current one.

Examples

UNIX: cd /usr/local/matlab/toolbox/demos

DOS: cd C:MATLAB\DEMOS

VMS: cd DISK1:[MATLAB.DEMOS]

Macintosh: cd Toolbox:Demos

To specify a Macintosh directory name that includes spaces, enclose the name in single quotation marks, as in 'Toolbox:New M-Files'.

See Also

dir         Directory listing

path        Control MATLAB's directory search path

what        Directory listing of M-files, MAT-files, and MEX-files



[ Previous | Help Desk | Next ]