I have an M-File containing the definitions listed below. I run this M-File so that the enumeration definitions become available to Simulink.
Simulink.defineIntEnumType('engine_state_T', ... {'ENGINE_IN_STOP','ENGINE_IN_CRANK','ENGINE_IN_STALL', 'ENGINE_IN_RUN', 'ENGINE_IN_AUTOSTOP'}, ... [0,1,2,3,4])Simulink.defineIntEnumType('vehicle_state_T', ... {'VEHICLE_IN_STOP','VEHICLE_IN_CRANK','VEHICLE_IN_STALL'}, ... [0,1,2])
I want to issue a command from within one of my scripts, much like I do for getting the workspace objects ('who'), so that I can get a list of these enumerations. My script knows nothing about this M-File and simply needs to find the enumeration names that are defined (engine_state_T, vehicle_state_T, etc.)
Best Answer