Delete attribute
cdflib.deleteAttr(cdfId,attrNum)
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.
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
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.