This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Data Types Supported by Simulink

Simulink® supports all built-in numeric MATLAB® data types. The term built-in data type refers to data types defined by MATLAB itself as opposed to data types defined by MATLAB users. Unless otherwise specified, the term data type in the Simulink documentation refers to built-in data types.

The following table lists the built-in MATLAB data types supported by Simulink.

NameDescription

double

Double-precision floating point

single

Single-precision floating point

int8

Signed 8-bit integer

uint8

Unsigned 8-bit integer

int16

Signed 16-bit integer

uint16

Unsigned 16-bit integer

int32

Signed 32-bit integer

uint32

Unsigned 32-bit integer

int64

Signed 64-bit integer

uint64

Unsigned 64-bit integer

string

Text

Besides these built-in types, Simulink defines a boolean (true or false) type. The values 1 and 0 represent true and false respectively. For this data type, Simulink represents real, nonzero numeric values (including Inf) as true (1).

Block Support for Data and Signal Types

All Simulink blocks accept signals of type double by default. Some blocks prefer boolean input and others support multiple data types on their inputs. For more information on the data types supported by a specific block for parameter and input and output values, see the reference page for that block. If the documentation for a block does not specify a data type, the block inputs or outputs only data of type double.

Several blocks support bus objects (Simulink.Bus) as data types. See Data Types for Bus Signals.

Many Simulink blocks also support fixed-point data types. For more information about fixed-point data, see Specify Fixed-Point Data Types. For more information on the data types supported by a specific block for parameter and input and output values, in the Simulink documentation see the Data Type Support section of the reference page for that block. If the documentation for a block does not specify a data type, the block inputs or outputs only data of type double.

To view a table that summarizes the data types supported by the blocks in the Simulink block libraries, execute the following command at the MATLAB command line:

showblockdatatypetable

See Also

|

Related Topics