|On this page…|
In MATLAB®, you can express an enumerated type as either the enumeration string or its equivalent numeric value.
The readEnum function from the shrlibsample library displays a string that matches the input argument.
Look at the definition in the shrlibsample.h header file for information about the values for the Enum1 input.
This example shows how to call readEnum with a string.
ans = You chose en4