沿指定维度添加向量到数组
数学功能 /矩阵和线性代数 /矩阵操作
DSPMTRX3
阵列矢量添加块在指定维度中添加了值n-dimensional input array一个输入向量中的值v。
这length of the inputv必须与指定维度的长度相同一个。这一个rray-Vector Add block adds each element ofvto the corresponding element along that dimension of一个。
考虑三维m-by-n-by-p输入数组A(i,j,k)和n-b-1输入向量v。当。。。的时候一个dd along dimensionparameter is set to2
,,,,the output of the blocky((一世,,,,j,,,,k)是
在哪里
这output of the Array-Vector Add block is the same size as the input array,一个。该块接受真实且复杂的浮点和固定点输入。
下图显示了固定点信号的数组 - 矢量添加块中使用的数据类型。
指定向量时v在main块蒙版的窗格,您必须指定其元素的数据类型和缩放属性vector (V)参数数据类型tab. When the vector comes in through the block port, its elements inherit their data type and scaling from the driving block.
您可以在“块”对话框中设置向量,累加器和输出数据类型,如下所述。
main Tab
Specify the dimension along which to add the input array一个to the elements of vectorv。
Specify the source of the vector,v。这vector can come from the输入端口
或来自对话参数
。
指定向量,v。仅当您选择时才可见此参数对话参数
for the向量(v)源范围。
数据类型选项卡
笔记
浮点继承优先于该窗格上定义的数据类型设置。当输入是浮点时,块会忽略这些设置,所有内部数据类型都是浮点。
指定定点操作的舍入模式为以下一项:
Floor
天花板
收敛
最近
Round
Simplest
零
有关更多详细信息,请参阅rounding mode。
如果累加器data type is继承:通过内部规则继承
and输出data type is继承:与累加器相同
, 的价值舍入模式does not affect the numerical results.
笔记
这舍入模式andSaturate on integer overflowsettings have no effect on numerical results when both of these conditions are met:
累加器是继承:通过内部规则继承
输出是继承:与累加器相同
With these data type settings, the block is effectively operating in full precision mode.
当您选择此参数时,块会饱和其定点操作的结果。当您清除此参数时,该块包含其定点操作的结果。有关详细信息saturate
and裹
, 看overflow mode用于定点操作。
使用此参数来指定向量元素的单词和分数长度,v。您可以将此参数设置为:
继承数据类型的规则,例如Inherit: Same word length as input
一个n expression that evaluates to a valid data type, for example,FIXDT(1,16,0)
Click the显示数据类型助手按钮显示数据类型助手,这可以帮助您设置累加器范围。
看使用数据类型助手指定数据类型(金宝appSimulink)了解更多信息。
笔记
这vector (V)参数数据类型窗格仅在选择时才可见对话参数
for the向量(v)源参数mainpane of the block mask. When the vector comes in through the block's input port, the data type and scaling of its elements are inherited from the driving block.
指定累加器数据类型。看Fixed-Point Data Types对于显示该块中累加器数据类型的图表。您可以将此参数设置为:
继承数据类型的规则,例如继承:通过内部规则继承
。For more information on this rule, seeInherit via Internal Rule。
继承数据类型的规则,例如继承:与第一输入相同
。
一个n expression that evaluates to a valid data type, for example,FIXDT(1,16,0)
Click the显示数据类型助手按钮显示数据类型助手,这可以帮助您设置累加器范围。
看使用数据类型助手指定数据类型(金宝appSimulink)了解更多信息。
指定输出数据类型。看Fixed-Point Data Types对于描述该块中输出数据类型的使用的插图。您可以将其设置为:
继承数据类型的规则,例如继承:与累加器相同
继承数据类型的规则,例如继承:与第一输入相同
一个n expression that evaluates to a valid data type, for example,FIXDT(1,16,0)
Click the显示数据类型助手按钮显示数据类型助手,这可以帮助您设置输出范围。
看Control Data Types of Signals(金宝appSimulink)了解更多信息。
指定块应输出的最小值。默认值是[]
(未指定)。金宝appSimulink®软件使用此值执行:
模拟范围检查(请参阅指定信号范围(金宝appSimulink))
定点数据类型的自动缩放
指定块应输出的最大值。默认值是[]
(未指定)。金宝appSimulink使用此值执行:
模拟范围检查(请参阅指定信号范围(金宝appSimulink))
定点数据类型的自动缩放
选择此参数,以防止定点工具覆盖您在块蒙版上指定的数据类型。
港口 | Supported Data Types |
---|---|
一个 |
|
v |
|
输出 |
|