Matrix Concatenate, Vector Concatenate - Concatenate input signals of same data type to create contiguous output signal

Library

Math Operations

Description

The Concatenate block concatenates the signals at its inputs to create an output signal whose elements reside in contiguous locations in memory. This block operates in either vector or multidimensional array concatenation mode, depending on the setting of its Mode parameter. In either case, the inputs are concatenated from the top to bottom, or left to right, input ports.

Vector Mode

In vector mode, all input signals must be either vectors or row vectors [1xM matrices] or column vectors [Mx1 matrices] or a combination of vectors and either row or column vectors. The output is a vector if all inputs are vectors.

The output is a row or column vector if any of the inputs are row or column vectors, respectively.

Multidimensional Array Mode

Multidimensional array mode accepts vectors and arrays of any size. It assumes that the trailing dimensions are all ones for input signals with lower dimensionality. For example, if the output is 4-D and the input is [2x3] (2-D) this block treats the input as [2x3x1x1]. The output is always an array. The block's Concatenate dimension parameter allows you to specify the output dimension along which the block concatenates its input arrays. If you set the Concatenate dimension parameter to 2 and inputs are 2-D matrices, the block performs horizontal matrix concatenation and places the input matrices side-by-side to create the output matrix, e.g.,

If you set the Concatenate dimension parameter to 1 and inputs are 2-D matrices, the block performs vertical matrix concatenation and stacks the input matrices on top of each other to create the output matrix, e.g.,

For horizontal concatenation, the input matrices must have the same column dimension; for vertical concatenation, the same row dimension. All input signals must have the same dimension for all dimensions other than the concatenation dimensions.

If you set the Mode parameter to Multidimensional array, the Concatenate dimension parameter to 3, and the inputs are 2-D matrices, the block performs multidimensional matrix concatenation, e.g.,

Data Type Support

Accepts signals of any data type supported by Simulink software. All inputs must be of the same data type. Outputs the same data type as the input.

For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink.

Parameters and Dialog Box

Number of inputs

Number of inputs on this block.

Mode

Specifies the type of concatenation performed by this block. Options are:

Concatenate dimension

Specifies the output dimension along which to concatenate the input arrays. For example, to concatenate the input arrays vertically or horizontally, specify 1 or 2, respectively. This option appears only if you select Multidimensional array for the Mode parameter.

Characteristics

Direct Feedthrough

Yes

Sample Time

Inherited from driving block

Scalar Expansion

No

Dimensionalized

Yes

Multidimensionalized

Yes

Zero Crossing

No

See Also

cat in the MATLAB reference documentation

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS