Skip to Main Content Skip to Search
Product Documentation

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.

See Also

cdflib.inquireAttrEntry | cdflib.inquireAttrgEntry

Tutorials

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


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