Main Content

matlab.io.hdf4.sd.nameToIndices

Package: matlab.io.hdf4.sd

List of data sets with same name

Syntax

varstruct = nameToIndices(sdID,sdsname)

Description

varstruct = nameToIndices(sdID,sdsname) returns a structure array for all data sets with the same name. Each element of varstruct has two fields.

'index'Index of data set
'type'Type of data set, either 'SDSVAR', 'COORDVAR', or 'UNKNOWN'

This function corresponds to the SDnametoindices function in the HDF library C API.

Examples

import matlab.io.hdf4.*
sdID = sd.start('sd.hdf');
varlist = sd.nameToIndices(sdID,'latitude');
sd.close(sdID);