- Define an enumuration class to use in MATLAB. Please refer to this documentation to learn how to define enumeration classes: https://www.mathworks.com/help/matlab/matlab_oop/enumerations.html
- Create variables in MATLAB Workspace.
- Copy them to model workspace in Model Explorer.
- Add a new MATLAB variable from Model Explorer toolstrip in model workspace
- Assign the value of that variable to the enum class value. It will change the data type of the variable to enum.