I created a class 'myClass' in MATLAB, which works fine from the MATLAB Command Window. I then made a Simulink model with a MATLAB Function block that instantiates an object of type 'myClass'. When I generate code from this block, I receive the following error:
'myClass' is not a supported enumeration. For code generation, enumerations must inherit from 'int32' or 'Simulink.IntEnumType'. Function 'MATLAB Function' (#18.28.35), line 4, column 5: "myClass"
Where does the enumeration issue come in, and how can I resolve it?
Best Answer