Skip to Main Content Skip to Search
Product Documentation

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 these functions, 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.

See Also

cdflib.getNumAttrEntries

Tutorials

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS