编辑: 静看花开花落 2019-07-31
Copyright ? 2014-2015 RM, All Rights Reserved.

常见问题 ? 1971-2000年平均的逐月降水量应该对30年求平均 不是求和 ? 夏季的降水量应该是对

6、

7、8三个月份求和不是 求平均 3-1 Copyright ? 2014-2015 RM, All Rights Reserved. 4-2 Copyright ? 2014-2015 RM, All Rights Reserved. 4-3 Copyright ? 2014-2015 RM, All Rights Reserved. 4-4 Copyright ? 2014-2015 RM, All Rights Reserved. for ? valArray ― Create a column vector, index, from subsequent columns of array valArray on each iteration. For example, on the first iteration, index = valArray(:,1). The loop executes a maximum of n times, where n is the number of columns of valArray, given by numel(valArray,1,:). The input valArray can be of any MATLAB? data type, including a string, cell array, or struct 3-5 Copyright ? 2014-2015 RM, All Rights Reserved. for 3-6 Copyright ? 2014-2015 RM, All Rights Reserved. 小结 ? 常用函数 C length,A( 3*4*2 ) C mean / sum / nanmean / nansum C squeeze C reshape,permute C max,max( A ),max( A, [ ],

2 ) C sort,sort( A ),sort( A,

2 ) C flipud / fliplr C sum(A),对于高维矩阵A,只对第一个非1维作用 4-7 Copyright ? 2014-2015 RM, All Rights Reserved. 小结 ? 流程控制 4-8 Copyright ? 2014-2015 RM, All Rights Reserved. 小结 ? 流程控制 C scalar or string,case value in a cell array C otherwise 可以不出现 4-9 Copyright ? 2014-2015 RM, All Rights Reserved. 小结 ? 流程控制 ? break,终止循环,跳出最内层循环 ? continue,结束本次循环,以下语句不执行,进行 下一次循环 4-10 主讲人:毛睿 北京师范大学 地表过程与资源生态国家重点实验室 Email: [email protected] 3/25/2015 Copyright ? 2014-2015 RM, All Rights Reserved. MATLAB及其在地学中的应用 第四讲 文本文件的读写 Copyright ? 2014-2015 RM, All Rights Reserved. 主要内容 字符串数组文本文件的读文本文件的写元胞数组和结构体数组字符串数组 Copyright ? 2014-2015 RM, All Rights Reserved. ASCII码表 4-14 Copyright ? 2014-2015 RM, All Rights Reserved. ASCII码表 4-15 Copyright ? 2014-2015 RM, All Rights Reserved. 字符串数组建立 ? 一维 4-16 'Matlab' is good' ?? Copyright ? 2014-2015 RM, All Rights Reserved. 字符串数组建立 ? 二维 4-17 str3 = [ str1;

str2 ] ?? Copyright ? 2014-2015 RM, All Rights Reserved. convert to character array (string) 4-18 valid from

0 to

65535 Integer四舍五入,double NOT Copyright ? 2014-2015 RM, All Rights Reserved. number to string 4-19 Copyright ? 2014-2015 RM, All Rights Reserved. string to number 4-20 Copyright ? 2014-2015 RM, All Rights Reserved. eval ? 效率低下,不参与编译 ? 输入多变,连接字符串麻烦 4-21 y = dlmread( 'c:/54511.txt' );

?? num2str(

54511 ) ?? Copyright ? 2014-2015 RM, All Rights Reserved. strcmp和findstr 4-22 元胞数组和结构体数组 Copyright ? 2014-2015 RM, All Rights Reserved. array概念 4-24 Copyright ? 2014-2015 RM, All Rights Reserved. 元胞数组 4-25 Copyright ? 2014-2015 RM, All Rights Reserved. 元胞数组建立 4-26 Copyright ? 2014-2015 RM, All Rights Reserved. 元胞数组访问 ? 圆括号访问生成cell ? 花括号访问生成文本 4-27 Copyright ? 2014-2015 RM, All Rights Reserved. 高维元胞数组 4-28 Copyright ? 2014-2015 RM, All Rights Reserved. 结构体数组 4-29 Copyright ? 2014-2015 RM, All Rights Reserved. 结构体数组 4-30 文本文件的读 Copyright ? 2014-2015 RM, All Rights Reserved. http://www.mathworks.cn/cn/help/matlab/t ext-files.html 4-32 Copyright ? 2014-2015 RM, All Rights Reserved. Methods for Importing Data ? Tools that Import Multiple File Formats C Import Data ,call uiimport C double-click a file ? Importing Specific File Formats C numeric file,dlmread C mixed text and numeric file,fscanf(规则), textscan(不规则) 4-33 Copyright ? 2014-2015 RM, All Rights Reserved. numeric data ? dlmread C 所见即所得 C 分隔符1个C缺位元素补0 4-34 Copyright ? 2014-2015 RM, All Rights Reserved. numeric data ? dlmread 4-35 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 规则排列 C fopen,fscanf和fclose 4-36 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 规则排列 C fopen,fscanf和fclose 4-37 Copyright ? 2014-2015 RM, All Rights Reserved. 4-38 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 规则排列 C fopen,fscanf和fclose 4-39 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan 4-40 cell类型 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan 4-41 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan 4-42 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan 4-43 Copyright ? 2014-2015 RM, All Rights Reserved. 4-44 Copyright ? 2014-2015 RM, All Rights Reserved. 4-45 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan 4-46 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data 4-47 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? 不规则排列 C textscan ? string 4-48 Copyright ? 2014-2015 RM, All Rights Reserved. nonrectangular text file ? textscan 4-49 Copyright ? 2014-2015 RM, All Rights Reserved. nonrectangular text file ? fscanf 4-50 textscan与fscanf的区别?? Copyright ? 2014-2015 RM, All Rights Reserved. nonrectangular text file ? fgetl和textscan 4-51 Copyright ? 2014-2015 RM, All Rights Reserved. 其他文本文件 ? xlsread ? importdata 4-52 文本文件的写 Copyright ? 2014-2015 RM, All Rights Reserved. numeric data ? dlmwrite 4-54 't' ?? Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? fprintf C column order 4-55 一个%对应 一个数,先A1,然后A2 Copyright ? 2014-2015 RM, All Rights Reserved. mixed numeric and text data ? fprintf C column order 4-56 主讲人:毛睿 北京师范大学 地表过程与资源生态国家重点实验室 Email: [email protected] 3/25/2015 Copyright ? 2014-2015 RM, All Rights Reserved.

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题