Documentation

This is machine translation

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

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

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

Related Examples

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

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?