Main Content

matlab.io.hdf4.sd

直接与 HDF4 多文件科学数据集 (SD) 接口交互

说明

要使用这些 MATLAB® 函数,您应该熟悉 HDF SD C API。大多数情况下,MATLAB 函数的语法与对应的 HDF 库函数语法类似。这些函数以 matlab.io.hdf4.sd 包的形式实现。要使用此包,请在函数名称上加上程序包路径前缀,或在调用函数前,使用导入函数将该包添加到当前的导入列表中,例如,

import matlab.io.hdf4.*
sdID = sd.start('myfile.hdf','read');

访问权限

matlab.io.hdf4.sd.closeTerminate access to SD interface
matlab.io.hdf4.sd.endAccessTerminate access to data set
matlab.io.hdf4.sd.getFilenameName of file
matlab.io.hdf4.sd.selectIdentifier of data set with specified index
matlab.io.hdf4.sd.setExternalFileStore data in external file
matlab.io.hdf4.sd.startOpen HDF file and initialize SD interface

读/写

matlab.io.hdf4.sd.createCreate new data set
matlab.io.hdf4.sd.readDataRead subsample of data
matlab.io.hdf4.sd.setFillModeSet current fill mode of file
matlab.io.hdf4.sd.writeDataWrite to data set

查询

matlab.io.hdf4.sd.fileInfoNumber of data sets and global attributes in file
matlab.io.hdf4.sd.getCompInfoInformation about data set compression
matlab.io.hdf4.sd.getFillValueFill value for data set
matlab.io.hdf4.sd.getInfoInformation about data set
matlab.io.hdf4.sd.idToRefReference number corresponding to data set identifier
matlab.io.hdf4.sd.idTypeType of object
matlab.io.hdf4.sd.isCoordVarDetermine if data set is a coordinate variable
matlab.io.hdf4.sd.isRecordDetermine if data set is appendable
matlab.io.hdf4.sd.nameToIndexIndex value of named data set
matlab.io.hdf4.sd.nameToIndicesList of data sets with same name
matlab.io.hdf4.sd.refToIndexIndex of data set corresponding to reference number

维度

matlab.io.hdf4.sd.dimInfoInformation about dimension
matlab.io.hdf4.sd.getDimIDDimension identifier
matlab.io.hdf4.sd.getDimScaleScale data for dimension
matlab.io.hdf4.sd.setDimNameAssociate name with dimension
matlab.io.hdf4.sd.setDimScaleSet scale values for dimension

用户定义的属性

matlab.io.hdf4.sd.attrInfoInformation about attribute
matlab.io.hdf4.sd.findAttrIndex of specified attribute
matlab.io.hdf4.sd.readAttrRead attribute value
matlab.io.hdf4.sd.setAttrWrite attribute value

预定义的属性

matlab.io.hdf4.sd.getCalData set calibration information
matlab.io.hdf4.sd.getDataStrsPredefined attributes for data set
matlab.io.hdf4.sd.getDimStrsPredefined attributes for dimension
matlab.io.hdf4.sd.getFillValueFill value for data set
matlab.io.hdf4.sd.getRangeMaximum and minimum range values
matlab.io.hdf4.sd.setCalSet data set calibration information
matlab.io.hdf4.sd.setDataStrsSet predefined attributes for data set
matlab.io.hdf4.sd.setDimStrsSet label, unit, and format attributes
matlab.io.hdf4.sd.setFillValueSet fill value for data set
matlab.io.hdf4.sd.setRangeSet maximum and minimum range value for data set

分块操作

matlab.io.hdf4.sd.getChunkInfoChunk size for data set
matlab.io.hdf4.sd.readChunkRead chunk from data set
matlab.io.hdf4.sd.setChunkSet chunk size and compression method of data set
matlab.io.hdf4.sd.writeChunkWrite chunk to data set

压缩

matlab.io.hdf4.sd.setCompressSet compression method of data set
matlab.io.hdf4.sd.setNBitDataSetSpecify nonstandard bit length for data set values