String Constant

Output specified string

  • Library:
  • Simulink / String

  • String Constant block

Description

The String Constant block outputs a string specified by the String parameter. Use this block when you want a constant whose type is string.

Ports

Output

expand all

Output string, specified as a scalar.

Data Types: string

Parameters

expand all

Input string, specified as a scalar.

Output data type, specified using the string data type to specify a string with no maximum length.

To specify a string data type with a maximum length, specify stringtype(N). For example, stringtype(31) creates a string data type with a maximum length of 31 characters.

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the data type attributes. See Specify Data Types Using Data Type Assistant for more information.

Block Characteristics

Data Types

string

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2018a