第三章 MATLB程序设计基础.docVIP

  • 4
  • 0
  • 约3.45万字
  • 约 18页
  • 2016-10-13 发布于贵州
  • 举报
第三章 MATLB程序设计基础

第三章 MATLAB程序设计基础 chapter 3: Foundation of MATLAB program design 数据及数据文件(Data and Data file) 1. 数据类型:(Data mode) (表 3—1) 字符数组(Character array)、 数值数组(Numeric array)— 包括存储形整数(int8,uint8,int16,uint16,int32,uint32)单精度(signal), 双精度(duble),稀疏(sparse)等数组。 单元数组(Cell array)、 结构数组(Structure array) Java类(Java class) 函数句柄(Function handle) 在工作空间浏览器中不同的数据类型有着不同的图标标识,(见图 3—2)_ 2. 数据文件(Data file) MATLAB支持的各种数据文件(Readable file formats of MATLAB)及其调用方法和返回值见(表 3—2) (1)二进制数据文件:(Binary date file) 以.mat为扩展名。是标准的MATLAB数据文件。.mat文件可以由MATLAB提供的save和load命令直接存取。 (2)ASCⅡ码数据文件:(ASCⅡ code data file)扩展名为.txt, .dat等, 可以是在MATLAB环境下存储的,也可能是其他软件的计算结果,可以被MATLAB调用,也可以用文本编辑器打开进行观察与修改。 可以用save和load命令进行读入和存取。 (3).图象文件:(Graphics file) 扩展名为.bmp, .jpg .tif等,用于图形图象处理,可以用imread和imwrite命令进行读入和存取。 (4).声音文件: (Sound file) 扩展名为.wav ,用waveread 和 wavwrite命令进行读入和存取。 Readable file formats. Data formats Command Returns MAT- MATLAB workspace load Variables in file. CSV- Comma separated numbers csvread Double array. DAT- Formatted text importdata Double array. DLM- Delimited text dlmread Double array. TAB- Tab separated text dlmread Double array. Spreadsheet formats XLS - Excel worksheet xlsread Double array and cell array. WK1- Lotus 123 worksheet wk1read Double array and cell array. Scientific data formats CDF - Common Data Format cdfread Cell array of CDF records FITS- Flexible Image Transport System fitsread Primary or extension table data HDF - Hierarchical Data Format hdfread HDF or HDF-EOS data set Movie formats AVI - Movie aviread MATLAB movie. Image formats TIFF - TIFF image imread Truecolor, grayscale or indexed image(s). PNG - PNG image imread Truecolor, grayscale or indexed image. HDF - HDF image imread Truecolor or indexed image(s). BMP - BMP image imread

文档评论(0)

1亿VIP精品文档

相关文档