Dot Product
The scalar product of two vectors.
Description
The Dot Product block computes the scalar product of the input vectors. The scalar output y is equal to:
where u1 and u2 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 u1 and u2 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
Port_1 - input signal of the first operand
scalar
| vector
The first operand to calculate the scalar product.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Port_2 - input signal of the second operand
scalar
| vector
The second operand to calculate the scalar product.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.