This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Number of entries for attribute with global scope


nentries = cdflib.getNumAttrgEntries(cdfId,attrNum)


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.


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

cdfid ='example.cdf');

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

attrgEntries =


% Clean up

clear cdfid


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 website.

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?