cd 函数

来源:互联网 发布:大数据分析用户行为 编辑:程序博客网 时间:2024/05/21 17:08

cd 函数

Change working directory

改变工作目录

Graphical Interface

图表界面

As an alternative to the cd function, use the current directory field in the MATLAB desktop toolbar.

cd函数功能相同的方法是,使用位于MATLAB桌面工具条上的current directory目录。

Syntax

语法

cd

w = cd

cd('directory')

cd('..')

cd directory or cd ..

Description

描述

cd displays the current working directory.

cd显示当前工作目录

w = cd assigns the current working directory to w.

W=cd 指定当前工作目录给w

cd('directory') sets the current working directory to directory. Use the full pathname for directory. 

cd('directory')设置当前工作目录到指定目录。为目录使用完成路径名。

On UNIX platforms, the character ~ is interpreted as the user's root directory.

UNIX系统环境中,这个字段被翻译为用户的根目录。

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

Cd('..')改变当前工作目录到上一级目录。

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

cd 目录或者cd ..是语法的非引证形式。

Examples

例如:

On UNIX

UNIX系统中

cd('/usr/local/matlab/toolbox/demos')

changes the current working directory to demos.

改变当前工作目录到实例(demos)。

On Windows

windows 系统中

cd('c:/toolbox/matlab/demos')

changes the current working directory to demos. Then typing

改变当前目录到实例(demos)。然后键入

cd ..

changes the current working directory to matlab.

改变当前目录到matlab