Main Content

向量加入, Matrix Concatenate

加入input signals of same data type to create contiguous output signal

  • 图书馆:
  • 金宝appSimulink /常用块

    Simulink / Math Operations

    Simulink / Signal Routing

    HDL编码器 /数学操作

    HDL Coder / Signal Routing

  • 矢量联合块
  • 矢量联合块

Description

加入block concatenates the input signals to create an output signal whose elements reside in contiguous locations in memory.

提示

创造的连接块是有用的ing an output signal that is nonvirtual. However, to create a vector of function calls, use aMuxblock instead.

您使用加入块定义一系列公共汽车。有关定义一系列公共汽车数组的详细信息,请参阅Combine Buses into an Array of Buses

串联块以向量或多维阵列串联模式运行,具体取决于其设置Modeparameter. In either case, the block concatenates the inputs from the top to bottom, or left to right, input ports.

向量模式

在向量模式下,所有输入信号必须是向量或行向量(1 by-m矩阵)或列向量(M-BY-1矩阵)或向量和行或列向量的组合。当所有输入都是向量时,输出是向量。

如果任何输入是行或列向量,则输出分别为行或列向量。

多维阵列模式

多维阵列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]。输出始终是一个数组。这加入dimension参数允许您指定块将其输入数组串联的输出维度。

如果您设置加入dimension参数为2输入是2D矩阵,该块执行水平矩阵串联并将输入矩阵并排放置以创建输出矩阵。例如,请参阅ex_concatenate_horizo​​ntal模型:

如果您设置加入dimension参数为1输入是2-D矩阵,该块执行垂直矩阵串联并将输入矩阵彼此堆叠以创建输出矩阵。例如,请参阅ex_concatenate_vertical模型:

这input matrices must have compatible sizes for concatenation. Horizontal concatenation requires input matrices to have the same number of rows. Vertical concatenation requires the input matrices to have the same number of columns.

如果您设置Mode参数为多维阵列, 这加入dimension参数为3, and the inputs are 2-D matrices, the block performs multidimensional matrix concatenation. For example, see theEX_CONCATENATE_MULTIDIMS模型:

Ports

Input

展开全部

First input to concatenate, specified as a scalar, vector, matrix, or N-D array.

依赖性

  • Inputs must be of the same data type.

  • Matrix and N-D array inputs are supported only when you setMode多维阵列

数据类型:单身的|双倍的|一半|int8|int16|int32|INT64|UINT8|uint16|UINT32|Uint64|布尔|fixed point|enumerated|公共汽车

第n个输入到连接酸盐,指定为标量,向量,矩阵或N-D数组。

依赖性

  • 要启用此端口,请设置Number of inputs整数大于或等于2。

  • Inputs must be of the same data type.

  • Matrix and N-D array inputs are supported only when you setMode多维阵列

数据类型:单身的|双倍的|一半|int8|int16|int32|INT64|UINT8|uint16|UINT32|Uint64|布尔|fixed point|enumerated|公共汽车

输出

展开全部

沿指定维度的输入信号的串联。输出具有与输入相同的数据类型。

数据类型:单身的|双倍的|一半|int8|int16|int32|INT64|UINT8|uint16|UINT32|Uint64|布尔|fixed point|enumerated|公共汽车

参数

展开全部

Specify the number of inputs for the block as a real-valued, positive integer, less than or equal to 65536.

程序化使用

Block Parameter:NumInputs
类型:角色向量
值:正整数
默认:'2'

选择此块执行的串联类型。默认值Mode矢量联合块的位置为向量。默认值Modeof the Matrix Concatenate block is多维阵列

  • When you select向量该块执行矢量串联(请参阅向量模式for details).

  • When you select多维阵列, 这block performs matrix concatenation (see多维阵列模式for details).

程序化使用

Block Parameter:Mode
类型:角色向量
值:'vector'|“多维阵列”
默认:'Vector'

Specify the output dimension along which to concatenate the input arrays.

  • 要垂直连接输入阵列,请输入1

  • 要水平串联输入阵列,请输入2

  • To perform multidimensional concatenation on the inputs, specify an integer greater than 2.

依赖性

要启用此参数,请设置Mode多维阵列

程序化使用

Block Parameter:串联型
类型:角色向量
值:标量整数
默认:'1'

Block Characteristics

数据类型

布尔|双倍的|enumerated|fixed point|一半|integer|单身的

Direct Feedthrough

是的

多维信号

no

可变大小信号

是的

零交叉检测

no

扩展功能

C/C ++代码生成
使用Simulink®Coder™生成C和C ++代码。金宝app

PLC代码生成
Generate Structured Text code using Simulink® PLC Coder™.

定点转换
Design and simulate fixed-point systems using Fixed-Point Designer™.

在R2009b中引入