| Contents | Index |
attrnum = cdflib.createAttr(cdfId,attrName,scope)
attrnum = cdflib.createAttr(cdfId,attrName,scope) creates an attribute in a CDF file with the specified scope.
attrNum |
Numeric value identifying the attribute. Attribute numbers are zero-based. |
Create a CDF, and then create an attribute in the CDF. 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');
% Clean up
cdflib.delete(cdfid);
clear cdfid
This function corresponds to the CDF library C API routine CDFcreateAttr. To use these functions, 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.
cdflib.deleteAttr | cdflib.getAttrNum | cdflib.getConstantNames | cdflib.getConstantValue
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |