Multiply array by vector along specified dimension
Math Functions / Matrices and Linear Algebra / Matrix Operations
dspmtrx3
The ArrayVector Multiply block multiplies the values in the specified dimension of the Ndimensional input array A by the values in the input vector V.
The length of the input V must be the same as the length of the specified dimension of A. The ArrayVector Multiply block multiplies each element of V by the corresponding element along that dimension of A.
Consider a 3dimensional
MbyNbyP input array
A(i,j,k) and an Nby1 input vector
V. When the Multiply along dimension parameter is
set to 2
, the output of the block Y(i,j,k) is
$$Y(i,j,k)=A(i,j,k)*V(j)$$
where
$$\begin{array}{l}1\le i\le M\\ 1\le j\le N\\ 1\le k\le P\end{array}$$
The output of the ArrayVector Multiply block is the same size as the input array, A. This block accepts real and complex floatingpoint and fixedpoint inputs.
The following diagram shows the data types used within the ArrayVector Multiply block for fixedpoint signals.
When you specify the vector V on the Main pane of the block mask, you must specify the data type and scaling properties of its elements in the Vector (V) parameter on the Data Types tab. When the vector comes in through the block port, its elements inherit their data type and scaling from the driving block.
The output of the multiplier is in the product output data type when at least one of the inputs to the multiplier is real. When both of the inputs to the multiplier are complex, the result of the multiplication is in the accumulator data type. For details on the complex multiplication performed, see Multiplication Data Types.
You can set the vector, accumulator, product output, and output data types in the block dialog as discussed below.
Main Tab
Specify the dimension along which to multiply the input array A by the elements of vector V.
Specify the source of the vector, V. The vector can come from the
Input port
or from a Dialog
parameter
.
Specify the vector, V. This parameter is visible only when you
select Dialog parameter
for the Vector (V)
source parameter.
Data Types Tab
Floatingpoint inheritance takes precedence over the data type settings defined on this pane. When inputs are floating point, the block ignores these settings, and all internal data types are floating point.
Specify the rounding mode for fixedpoint operations as one of the following:
Floor
Ceiling
Convergent
Nearest
Round
Simplest
Zero
For more details, see rounding mode.
When you select this parameter, the block saturates the result of its fixedpoint
operation. When you clear this parameter, the block wraps the result of its fixedpoint
operation. For details on saturate
and wrap
, see
overflow mode for fixedpoint operations.
Use this parameter to specify the word and fraction lengths for the elements of the vector, V. You can set this parameter to:
A rule that inherits a data type, for example, Inherit: Same word
length as input
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Accumulator parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
The Vector (V) parameter on the Data
Types pane is only visible when you select Dialog
parameter
for the Vector (V) source parameter on
the Main pane 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.
Specify the product output data type. See FixedPoint Data Types and Multiplication Data Types for illustrations depicting the use of the product output data type in this block. You can set it to:
A rule that inherits a data type, for example, Inherit: Inherit via
internal rule
. For more information on this rule, see Inherit via Internal Rule.
A rule that inherits a data type, for example, Inherit: Same as
first input
.
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Product output parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
Specify the accumulator data type. See FixedPoint Data Types for illustrations depicting the use of the accumulator data type in this block. You can set this parameter to:
A rule that inherits a data type, for example, Inherit: Inherit via
internal rule
. For more information on this rule, see Inherit via Internal Rule.
A rule that inherits a data type, for example, Inherit: Same as
first input
.
A rule that inherits a data type, for example, Inherit: Same as
product output
.
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Accumulator parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
Specify the output data type. See FixedPoint Data Types for illustrations depicting the use of the output data type in this block. You can set it to:
A rule that inherits a data type, for example, Inherit: Same as
product output
A rule that inherits a data type, for example, Inherit: Same as
first input
.
An expression that evaluates to a valid data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output parameter.
See Control Signal Data Types (Simulink) for more information.
Specify the minimum value that the block should output. The default value is
[]
(unspecified). Simulink^{®} uses this value to perform:
Simulation range checking (see Signal Ranges (Simulink))
Automatic scaling of fixedpoint data types
Specify the maximum value that the block should output. The default value is
[]
(unspecified). Simulink uses this value to perform:
Simulation range checking (see Signal Ranges (Simulink))
Automatic scaling of fixedpoint data types
Select this parameter to prevent the fixedpoint tools from overriding the data types you specify on the block mask.
Port  Supported Data Types 

A 

V 

Output 
