Documentation

Use Enumerated Data in MATLAB Function Blocks

The basic workflow for using enumerated data in MATLAB Function blocks:

StepActionHow?
1

Define an enumerated data type that inherits from Simulink.IntEnumType, int8, uint8, int16, uint16, or int32.

See Define Enumerated Data Types for MATLAB Function Blocks.

2

Add the enumerated data to your MATLAB Function block.

See Add Inputs, Outputs, and Parameters as Enumerated Data.

3

Instantiate the enumerated type in your MATLAB Function block.

See Instantiate Enumerated Data in MATLAB Function Blocks.

4

Simulate and/or generate code.

See Use Enumerated Data in Generated Code.

Related Examples

More About

Was this topic helpful?