FUNCTION REFERENCE

cd

Change the current folder.

Change the current folder.

Syntax

old = cd(folder)

Syntax

cd folder

Syntax

cd

Returns the previous folder when assigned. Sets file I/O and function lookup together; the desktop Files panel adopts changes after the job. With no argument, reports the current folder.

Example

old=cd(pwd); strcmp(old,pwd)   % 1

Differences from MATLAB: Changes the engine folder, not the host process current directory.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.