向量加入, 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_horizontal模型:
如果您设置加入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
输出
参数
Block Characteristics
数据类型 |
|
Direct Feedthrough |
|
多维信号 |
|
可变大小信号 |
|
零交叉检测 |
|