This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

H5T.enum_create

Create new enumeration data type

Syntax

output = H5T.enum_create(parent_id)

Description

output = H5T.enum_create(parent_id) creates a new enumeration data type based on the specified base data type, parent_id, which must be an integer type. output is a data type identifier for the new enumeration data type.

Examples

parent_id = H5T.copy('H5T_NATIVE_UINT');
type_id = H5T.enum_create(parent_id);
H5T.enum_insert(type_id,'red',1);
H5T.enum_insert(type_id,'green',2);
H5T.enum_insert(type_id,'blue',3);
H5T.close(type_id);
H5T.close(parent_id);