matlab2014a中help与参考页翻译 Tutorials – workspace variables

来源:互联网 发布:winpe启动盘制作软件 编辑:程序博客网 时间:2024/05/18 13:27

镇场诗:慈心积善融学习,技术誓为大家学。善心速造多好事,前人栽树后乘凉。我今于此写经验,愿见文者得启发。

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Workspace Variables

The workspace contains variables that you create within or import into MATLAB® from data files or other programs.

工作区包含的变量,有些是你创建的,有些是MATLAB从其它文件或者程序中读取到的。


For example, these statements create variables A and B in the workspace.

举个例子,下面的语句在工作区创建了变量A与B

A = magic(4);

B = rand(3,5,2);


You can view the contents of the workspace using whos.

你可以用whos查看工作区里面的内容。

whos

  Name      Size             Bytes  Class     Attributes


  A         4x4                128  double              

  B         3x5x2              240  double              


The variables also appear in the Workspace pane on the desktop.

变量们在桌面的工作区章也有显示。

 

Workspace variables do not persist after you exit MATLAB. Save your data for later use with the save command,

save myfile.mat

工作区的变量们在你退出MATLAB后就不存在了,所以保存你的数据很重要。


Saving preserves the workspace in your current working folder in a compressed file with a .mat extension, called a MAT-file.

保存工作区的当前的数据状态,在你现在工作的文件夹中生成一个后缀名为.mat的文件。


To clear all the variables from the workspace, use the clear command.

用clear命令,清除工作区中的所有变量。


Restore data from a MAT-file into the workspace using load.

load myfile.mat

从.mat文件中恢复数据到工作区用 load命令。




///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

感恩帮助过我的人。博客的精髓在技术部分,更在镇场一诗。
我是一个新手,翻译还有许多不完善的地方,请您看翻译的时候多多思考。
MATLAB是一个优秀的软件,值得学习。如果您有一些不会的知识,咱们可以相互讨论。
如果您认为翻译可以有改进的地方,有错误的地方,请留下评论,我会处理的。
注:如果我的博文无意中侵犯了您的权益,请告知。看到您的告知后,我将及时作出处理。

0 0