Dot Product
Performs the scalar product of two vectors.
blockType: DotProduct
Path in the library:
|
Description
Block Dot Product Calculates the scalar product of the input vectors. The scalar output of is equal to:
,
where and are input vectors.
The input signal can be a vector, a column vector (a matrix with one column), or a scalar. If both inputs are vectors or column vectors, they must be of the same length. If and are both column vectors, the block outputs the equivalent of the expression .
The elements of the input vectors can be real or complex signals. The type of signal (complex or real) at the output depends on the types of signals at the inputs.
Input 1 | Input 2 | Output |
---|---|---|
real |
real |
real |
material |
complex |
complex |
complex |
material |
complex |
complex |
complex |
complex |
Ports
Input
#
In_1
—
input signal of the first operand
scalar
| vector
Details
The first operand for calculating the scalar product.
Data types |
|
Complex numbers support |
Yes |
#
In_2
—
input signal of the second operand
scalar
| vector
Details
The second operand for calculating the scalar product.
Data types |
|
Complex numbers support |
Yes |
Output
#
OUT_1
—
scalar product output signal
scalar
| vector
Details
An output signal obtained by calculating the scalar product of two input signals.
Data types |
|
Complex numbers support |
Yes |