Hauptinhalt

cdflib.getConstantValue

Numeric value corresponding to Common Data Format (CDF) library constant

Syntax

value = cdflib.getConstantValue(constantName)

Description

value = cdflib.getConstantValue(constantName) returns the numeric value of the CDF library constant specified in constantName. Specify constantName as a string scalar or character vector. To see a list of constant names, use cdflib.getConstantNames.

Examples

collapse all

Create a list of named constants in the CDF library.

names = cdflib.getConstantNames;

Display the name and value of the first constant.

name = names{1};
value = cdflib.getConstantValue(name);
message = sprintf("The constant %s has value %d.",name,value)
message = 
"The constant AHUFF_COMPRESSION has value 3."

Tips

  • This function is a MATLAB® utility function and does not correspond to any function in the CDF library C API.