Main Content
matlab.io.hdfeos.gd.nEntries
Namespace: matlab.io.hdfeos.gd
Number of specified objects
Syntax
nentries = nEntries(gridID,entType)
Description
nentries = nEntries(gridID,entType)
returns
the number of specified objects in a grid. entType
can
be either 'dims'
or 'fields'
.
This function corresponds to the GDnentries
function
in the HDF-EOS library C API.
Examples
import matlab.io.hdfeos.* fid = gd.open('grid.hdf'); gridID = gd.attach(fid,'PolarGrid'); ndims = gd.nEntries(gridID,'dims'); nflds = gd.nEntries(gridID,'fields'); gd.detach(gridID); gd.close(fid); fprintf('The number of dimensions is %d.\n', ndims); fprintf('The number of fields is %d.\n', nflds);