Main Content

matlab.io.hdf4.sd.nameToIndices

Namespace: matlab.io.hdf4.sd

List of datasets with same name

Syntax

varstruct = nameToIndices(sdID,sdsname)

Description

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

'index'Index of dataset
'type'Type of dataset, 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);