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 dataset
matlab.io.hdf4.sd.getFilenameName of file
matlab.io.hdf4.sd.selectIdentifier of dataset 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 dataset
matlab.io.hdf4.sd.readDataRead subsample of data
matlab.io.hdf4.sd.setFillModeSet current fill mode of file
matlab.io.hdf4.sd.writeDataWrite to dataset

查询

matlab.io.hdf4.sd.fileInfoNumber of datasets and global attributes in file
matlab.io.hdf4.sd.getCompInfoInformation about dataset compression
matlab.io.hdf4.sd.getFillValue数据集填充值
matlab.io.hdf4.sd.getInfoInformation about dataset
matlab.io.hdf4.sd.idToRefReference number corresponding to dataset identifier
matlab.io.hdf4.sd.idTypeType of object
matlab.io.hdf4.sd.isCoordVarDetermine if dataset is a coordinate variable
matlab.io.hdf4.sd.isRecordDetermine if dataset is appendable
matlab.io.hdf4.sd.nameToIndexIndex value of named dataset
matlab.io.hdf4.sd.nameToIndicesList of datasets with same name
matlab.io.hdf4.sd.refToIndexIndex of dataset 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.getCalDataset calibration information
matlab.io.hdf4.sd.getDataStrsPredefined attributes for dataset
matlab.io.hdf4.sd.getDimStrsPredefined attributes for dimension
matlab.io.hdf4.sd.getFillValueFill value for dataset
matlab.io.hdf4.sd.getRangeMaximum and minimum range values
matlab.io.hdf4.sd.setCalSet dataset calibration information
matlab.io.hdf4.sd.setDataStrsSet predefined attributes for dataset
matlab.io.hdf4.sd.setDimStrsSet label, unit, and format attributes
matlab.io.hdf4.sd.setFillValueSet fill value for dataset
matlab.io.hdf4.sd.setRangeSet maximum and minimum range value for dataset

分块操作

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

压缩

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