cdflib.getAttrMaxEntry

Number of last entry for variable attribute

Syntax

maxEntry = cdflib.getAttrMaxEntry(cdfId,attrNum)

Description

maxEntry = cdflib.getAttrMaxEntry(cdfId,attrNum) returns the number of the last entry for an attribute in a Common Data Format (CDF) file.

cdfId identifies the CDF file.

attrNum is a numeric value that specifies the attribute. Attribute numbers are zero-based. The attribute must have variable scope.

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. Attribute numbers are zero-based. The attribute must have variable scope.

Output Arguments

maxEntry

Entry number of the last entry in the attribute. Entry numbers are zero-based.

Examples

Open the example CDF and get the number of the last entry associated with an attribute with variable scope in the file:

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

% The fourth attribute is of variable scope.
attrscope = cdflib.getAttrScope(cdfid,3)

attrscope =

VARIABLE_SCOPE


% Get the number of the last entry for this attribute.
entrynum = cdflib.getAttrMaxEntry(cdfid,3)

entrynum =

    3


% Clean up
cdflib.close(cdfid);

clear cdfid

References

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

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.