首页 >> 仿真软件说明 >>MATLAB >>6.5版本 >> 文件管理命令
详细内容

文件管理命令

what :列出当前目录下的M、MAT、MEX文件清单

>> what

M-files in the current directory D:\MATLAB6p1\toolbox\matlab\elfun

Contents    asech       cosh        isreal      sec         

abs         asin        cot         log         sech        

acos        asinh       coth        log10       sign        

acosh       atan        cplxpair    log2        sin         

acot        atan2       csc         mod         sinh        

acoth       atanh       csch        nextpow2    sqrt        

acsc        ceil        exp         pow2        tan         

acsch       complex     fix         real        tanh        

angle       conj        floor       rem         unwrap      

asec        cos         imag        round       

MEX-files in the current directory D:\MATLAB6p1\toolbox\matlab\elfun

complex



dir:列出指定目录下的文件和子目录清单

dir 目录名 %列出指定目录下的文件和子目录清单

>> dir

.            asinh.m      cplxpair.m   pow2.m       

..           atan.m       csc.m        real.m       

Contents.m   atan2.m      csch.m       rem.m        

abs.m        atanh.m      exp.m        round.m      

acos.m       ceil.m       fix.m        sec.m        

acosh.m      complex.c    floor.m      sech.m       

acot.m       complex.csf  imag.m       sign.m       

acoth.m      complex.dll  isreal.m     sin.m        

acsc.m       complex.m    ja           sinh.m       

acsch.m      conj.m       log.m        sqrt.m       

angle.m      cos.m        log10.m      tan.m        

asec.m       cosh.m       log2.m       tanh.m       

asech.m      cot.m        mod.m        unwrap.m     

asin.m       coth.m       nextpow2.m


type 文件名: 显示指定M文件的内容

>> type abs.m

%ABS    Absolute value.

%   ABS(X) is the absolute value of the elements of X. When

%   X is complex, ABS(X) is the complex modulus (magnitude) of

%   the elements of X.

%

%   See also SIGN, ANGLE, UNWRAP.

%   Copyright 1984-2001 The MathWorks, Inc. 

%   $Revision: 5.8 $  $Date: 2001/04/15 12:02:51 $

%   Built-in function.


which 文件名 :指出M文件、MEX文件、工作空间变量、内置函数或Simulink模型所在的目录

>> which abs.m

D:\MATLAB6p1\toolbox\matlab\elfun\abs.m



matlabroot  :返回安装MATLAB的根目录

>> matlabroot

ans =

D:\MATLAB6p1


diary:把当前命令窗口中的所有内容(包括命令、计算结果等)保存到日志文件中

diary ('file') %使用指定文件名创建日志文件

diary off %暂停执行diary命令

diary on %恢复执行diary命令并使用当前的文件名


技术支持: CLOUD | 管理登录
seo seo