Main Content

cdflib.getConstantValue

与常用数据格式 (CDF) 库常量对应的数值

语法

value = cdflib.getConstantValue(constantName)

说明

value = cdflib.getConstantValue(constantName) 返回在 constantName 中指定的 CDF 库常量的数值。以字符向量或字符串标量形式指定 constantName。要查看常量名称的列表,请使用 cdflib.getConstantNames

示例

查看 CDF 库常量的列表并获取与某个常量对应的数值。

% Retrieve a list of library constants
names = cdflib.getConstantNames();

value = cdflib.getConstantValue(names{1})
value =

   3