cdflib.inquireAttr

Information about attribute

Syntax

info = cdflib.inquireAttr(cdfId,attrNum)

Description

info = cdflib.inquireAttr(cdfId,attrNum) returns information about an attribute in a Common Data Format (CDF) file.

Input Arguments

cdfId

Identifier of a CDF file, returned by a call to cdflib.create or cdflib.open.

attrNum

Numeric value that identifies the attribute in the file. Attribute numbers are zero-based.

Output Arguments

info

Structure containing the following fields.

FieldDescription
nameAttribute's name
scopeEither 'GLOBAL_SCOPE' or 'VARIABLE_SCOPE'
maxgEntryThe maximum entry number used for global attributes.
maxEntryThe maximum entry number used for attributes with variable scope.

Examples

Open the example CDF, and then get information about the first attribute in the file.

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

% Get information about an attribute
info = cdflib.inquireAttr(cdfid,0)

info = 

         name: 'SampleAttribute'
        scope: 'GLOBAL_SCOPE'
    maxgEntry: 4
     maxEntry: -1

% Clean up
cdflib.close(cdfid);

clear cdfid

References

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

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?