cdflib.getNumAttrgEntries

Number of entries for attribute with global scope

Syntax

nentries = cdflib.getNumAttrgEntries(cdfId,attrNum)

Description

nentries = cdflib.getNumAttrgEntries(cdfId,attrNum) returns the number of entries written for the specified global attribute in the Common Data Format (CDF) file.

cdfId identifies the CDF file. attrNum is a numeric value that identifies the attribute. Attribute numbers are zero-based. The attribute must have global scope.

Examples

Open the example CDF and find out how many entries are associated with a global attribute in the file.

cdfid = cdflib.open('example.cdf');

% The first attribute is a global attribute.
attrgEntries = cdflib.getNumAttrgEntries(cdfid,0)

attrgEntries =

    3

% Clean up
cdflib.close(cdfid);

clear cdfid

References

This function corresponds to the CDF library C API routine CDFgetNumAttrgEntries.

To use this function, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF Web site.

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?