Main Content

Data Types Supported by金宝app

金宝app®supports all built-in numeric MATLAB®data types. The termbuilt-in data typerefers 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.

下表列出了内置的MATLABdata types supported by Simulink.

Name Description

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

一半

Half-precision floating point (requires Fixed-Point Designer™ license)

string

Text

Besides these built-in types, Simulink defines aboolean(trueorfalse) type. The values1and0representtrueandfalserespectively. For this data type, Simulink represents real, nonzero numeric values (includingInf) astrue(1).

Block Support for Data and Signal Types

All Simulink blocks accept signals of typedoubleby default. Some blocks preferbooleaninput 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 typedouble.

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

Many Simulink blocks also support fixed-point data types. For more information about fixed-point data, seeSpecify 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 typedouble.

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