matlab中load命令的用法是什么的?
matlab中load命令的用法是什么的? LOAD Load workspace variables from disk.LOAD FILENAME retrieves all variables from a file given a full pathname
or a MATLABPATH relative partial pathname (see PARTIALPATH).If FILENAME
has no extension LOAD looks for FILENAME and FILENAME.mat and treats it
as a binary "MAT-file". If FILENAME has an extension other than .mat, it
is treated as ASCII.
LOAD, by itself, uses the binary "MAT-file" named 'matlab.mat'.It is
an error if 'matlab.mat' is not found.
LOAD FILENAME X loads only X.
LOAD FILENAME X Y Z ... loads just the specified variables.The
wildcard '*' loads variables that match a pattern (MAT-file only).
LOAD -ASCII FILENAME or LOAD -MAT FILENAME forces LOAD to treat the file
as either an ASCII file or a MAT file regardless of file extension.With
-ASCII, LOAD will error if the file is not numeric text.With -MAT, LOAD
will error if the file is not a MAT file generated by SAVE -MAT.
If FILENAME is a MAT file, requested variables from FILENAME are created
in the workspace. If FILENAME is not a MAT file, a double precision array
is created with name based on FILENAME.Leading underscores or digits in
FILENAME are replaced with X.Other non-alpha chars in FILENAME are
replaced with underscores.
S = LOAD(...) returns the contents of FILENAME in variable S.If
FILENAME is a MAT file, S is a struct containing fields matching the
variables retrieved.If FILENAME is an ASCII file, S is a double
precision array.
Use the functional form of LOAD, such as LOAD('filename'), when the
file name is stored in a string, when an output argument is requested,
or if FILENAME contains spaces.
See also SAVE, WHOS, UILOAD, SPCONVERT, PARTIALPATH, IOFUN, FILEFORMATS.
Overloaded methods
help activex/load.m
Overloaded methods
help ccshelp/load.m
help mdevproject/load.m
help cgproject/load.m
help xpc/load.m 如果数据格式是XXXX.mat ,可以直接 load XXXX;
如果文本格式XXXX.txt,也可以用load载入,load 'XXXX.txt';
另外文本格式也可以通过Import data转换成.mat格式,matlab默认处理.mat格式数据! 例:a=load('filename.txt');
filename.txt 存数据的文本文件,在当前路径/一般指在work文件夹下.
运行后a中的数据即为文件中的数据.
上面的英文帮助是最全的. 谢谢! 我的mat 文件是一个矩阵,load 进去后,怎么不是矩阵格式
是个struct格式.
这是怎么回事啊??
如图 原帖由 sigma665 于 2007-12-27 10:53 发表 http://www.chinavib.com/forum/images/common/back.gif
我的mat 文件是一个矩阵,load 进去后,怎么不是矩阵格式
是个struct格式.
这是怎么回事啊??
如图
看 写给学习 matlab 的新手们 这个精华帖
回复 #7 eight 的帖子
刚刚没搜到:@L
页:
[1]