Documentation

String to Enum

Input string signal to enumerated signal

  • Library:
  • Simulink / String

Description

TheString To Enumblock converts the input string signal to an enumerated signal. To use this block, create an enumeration class in the current folder and use that class name in theOutput data typeparameter.

Ports

Input

expand all

Input string signal, specified as a scalar.

Data Types:string

Output

expand all

Enumerated number associated with the input string, specified as a scalar.

Data Types:enumerated

Parameters

expand all

Use a data type object, for example,Simulink.IntEnumType.

Click theShow data type assistantbuttonto display theData Type Assistant, which helps you set the data type attributes. See指定数据类型使用数据泰pe Assistantfor more information.

Use a data type object, for example,Simulink.IntEnumType.

  • Enumerated— Enumerated data class object.

  • — Expressions that evaluate to data types. SelectingExpressionenables a second menu/text box to the right, where you can enter the expression.

Dependency

Clicking theShow data type assistantbutton enables this parameter.

Block Characteristics

Data Types

enumerated

Multidimensional Signals

No

Variable-Size Signals

No

Introduced in R2018a

Was this topic helpful?