cdflib.getAttrgEntry
全局属性中条目的值
语法
value = cdflib.getAttrgEntry(cdfId,attrNum,entryNum)
说明
value = cdflib.getAttrgEntry(cdfId,attrNum,entryNum)
返回常用数据格式 (CDF) 文件中全局属性条目的值。
输入参数
|
CDF 文件的标识符,通过调用 |
|
数值,用于标识属性。属性编号从 0 开始。该属性必须具有全局作用域。 |
|
数值,用于指定属性中的条目。条目编号从 0 开始。 |
输出参量
|
条目的值。 |
示例
打开示例 CDF 文件,然后获取与该文件中的全局属性关联的条目的值。
cdfId = cdflib.open("example.cdf"); % All of the first three attributes have global scope attrscope = cdflib.getAttrScope(cdfId,0)
attrscope = 'GLOBAL_SCOPE'
% Get information about the first entry for global attribute
[dtype,numel] = cdflib.inquireAttrgEntry(cdfId,0,0)
dtype = 'cdf_char' numel = 23
% Get the value of the first entry for this global attribute
value = cdflib.getAttrgEntry(cdfId,0,0)
value = 'This is a sample entry.'
% Clean up cdflib.close(cdfId) clear cdfId