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 Type Duplicate

Force all inputs to same data type

  • Library:
  • Simulink / Signal Attributes

Description

The Data Type Duplicate block forces all inputs to have the same data type. Other attributes of input signals, such as dimension, complexity, and sample time, are independent.

You can use the Data Type Duplicate block to check for consistency of data types among blocks. If all signals do not have the same data type, the block returns an error message.

The Data Type Duplicate block is typically used such that one signal to the block controls the data type for all other blocks. The other blocks are set to inherit their data types via backpropagation.

The block can also be useful in a user created library. These library blocks can be placed in any model, and the data type for all library blocks are configured according to the usage in the model. To create a library block with more complex data type rules than duplication, use the Data Type Propagation block.

Ports

Input

expand all

First input signal, specified as a scalar, vector, matrix, or N-D array. If all signals do not have the same data type, the block returns an error message.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated

Nth input signal, specified as a scalar, vector, matrix, or N-D array. If all signals do not have the same data type, the block returns an error message.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated

Parameters

expand all

Specify the number of inputs to this block as a real-valued positive integer.

Programmatic Use

Block Parameter: NumInputPorts
Type: character vector
Values: real-valued positive integer
Default: '2'

Block Characteristics

Data Types

double | single | Boolean | base integer | fixed point | enumerated | bus | string

Direct Feedthrough

Yes

Multidimensional Signals

Yes

Variable-Size Signals

Yes

Zero-Crossing Detection

No

Extended Capabilities

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

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced before R2006a