登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
1. dir dir lists files and folders in the current folder.(列出文件夹里的内容) dir name lists files and folders that match name. When name is afolder, dir lists the contents of the folder. Specify name using absolute orrelative path names. The name argument can include the * wildcard in the filename, and both the * and the ** wildcard in the path name. Characters next to a** wildcard must be file separators. listing = dir(name) returns attributes about name.
2.length Length of largest array dimension (矩阵最大维度的长度) L = length(X) L = length(X) returns the length of the largest array dimension inX. For vectors, the length is simply the number of elements. For arrays withmore dimensions, the length is max(size(X)). The length of an empty array iszero.
3.[ ] 用于赋空值
4. size Array size [m,n] = size (A) returns the number of rows and columns when A is amatrix. 5.strfind Find one string within another K=strfind (str,pattern)(在str的字符串中查找pattern样品字符) searches str for occurrences of pattern. The output, k, indicatesthe starting index of each occurrence of pattern in str. If pattern is notfound, then strfind returns an empty array, []. The strfind function executes acase-sensitive search. 6.str2double 把字符串转换为数值,可用str2num代替。 x = str2num('str') str是一个ASCII字符串表示的数值,这种调用格式把字符串转换成数值,str也可以是一个字符串矩阵,这种情况下,字符串矩阵被转换成一个数值矩阵。 当str为数值字符时,str2double和str2num两个函数一样;当str为非数值字符时,两个函数不同如:str = 'a'; a1 = str2num(str); %a1=[] a2 = str2double(str); %a2=NaN, 非数 7.find 找到非零值的位置 8.isempty TF = isempty(A) returnslogical 1 (true) if A is an empty array and logical 0 (false) otherwise. An empty array has at least one dimension ofsize zero, for example, 0-by-0 or 0-by-5. 9.fopen 获取整数文件标识符 FileID=fopen(filename) opens the file, filename, for binary read access, and returns an integerfile identifier equal to or greater than 3. MATLAB® reserves file identifiers0, 1, and 2 for standard input, standard output (the screen), and standarderror, respectively. If fopen cannot open the file, then fileID is -1. Fopen常搭配 fclose(fileID) closes an open file. 10.feof Test for end-of-file. status = feof(fileID) returns 1 if a previous operation set the end-of-file indicator for thespecified file. Otherwise, feof returns 0. fileID is an integer file identifierobtained from fopen. Opening an empty file does not set the end-of-file indicator. Readoperations, and the fseek and frewind functions, move the file positionindicator.
|