Documentation Center

  • Trial Software
  • Product Updates

cdflib.deleteAttr

Delete attribute

Syntax

cdflib.deleteAttr(cdfId,attrNum)

Description

cdflib.deleteAttr(cdfId,attrNum) deletes the specified attribute from the CDF file.

cdfId identifies the Common Data Format (CDF) file.attrNum is a numeric identifier that specifies the attribute. Attribute numbers are zero-based.

Examples

Create a CDF file, and then create an attribute in the file. Then delete the attribute. To run this example, you must be in a writable folder.

cdfid = cdflib.create('your_file.cdf');

% Create attribute.
attrNum = cdflib.createAttr(cdfId,'Purpose','global_scope');

% Prove it exists.
anum = cdflib.getAttrNum(cdfid,'Purpose')

anum =

     0

% Delete the attribute.
cdflib.deleteAttr(cdfid,attrNum);


% Clean up
cdflib.delete(cdfid);

clear cdfid

References

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

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

|

Tutorials

Was this topic helpful?