| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
The emlc command generates code for enumerated data types supported by the Embedded MATLAB subset. The subset supports two integer-based enumerated types:
Enumerated types based on Simulink.IntEnumType (available with a Simulink license)
Use enumerated types based on Simulink.IntEnumType with emlc when generating C executables or library code from Embedded MATLAB-compliant M-code. For information about defining enumerated types based on Simulink.IntEnumType, see Defining an Enumerated Data Type in the Simulink documentation.
Simulink.IntEnumType provides four static methods that you can override in your type definition to customize the behavior of enumerated data for simulation and code generation. To learn about these methods, see Overriding Default Methods (Optional).
Enumerated types based on int32
Use enumerated types based on int32 with emlc when generating C-MEX functions from Embedded MATLAB-compliant M-code, for rapid prototyping and verification of generated C code within MATLAB.
You can also use this enumerated type when generating C code with emlc, but int32 does not provide methods for customizing the behavior of enumerated data. For information about defining enumerated types based on int32, see Using Enumerated Data in Embedded MATLAB Compliant M-Code in the Embedded MATLAB documentation.
![]() | Overriding Default Methods (Optional) | Enumerated Type Limitations | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |