cdflib.getAttrEntry
具有可变范围的属性中条目的值
语法
value = cdflib.getAttrEntry(cdfId,attrNum,entryNum)
说明
value = cdflib.getAttrEntry(cdfId,attrNum,entryNum)
返回常用数据格式 (CDF) 文件中属性条目的值。
输入参数
|
CDF 文件的标识符,通过调用 |
|
数值,用于标识属性。属性编号从 0 开始。该属性必须具有可变的范围。 |
|
数值,用于指定属性中的条目。条目编号从 0 开始。 |
输出参数
|
条目的值。 |
示例
打开示例 CDF 文件,然后获取与该文件中具有可变范围的属性关联的条目的值。
cdfId = cdflib.open("example.cdf"); % The fourth attribute is of variable scope attrscope = cdflib.getAttrScope(cdfId,3)
attrscope = 'VARIABLE_SCOPE'
% Get information about the first entry for this attribute
[dtype,numel] = cdflib.inquireAttrEntry(cdfId,3,0)
dtype = 'cdf_char' numel = 10
% Get the value of the entry for this attribute % Note that it is a character vector of length 10 value = cdflib.getAttrEntry(cdfId,3,0)
value = 'Time value'
% Clean up cdflib.close(cdfId) clear cdfId