Skip to Main Content Skip to Search
Product Documentation

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

cdflib.createAttr | cdflib.getAttrNum

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