R = dot(A, B)
R = dot(A, B, dim)
| Parameter | Description |
|---|---|
| A, B | numeric arrays. |
| dim | positive integer scalar: Dimension to operate along. |
| Parameter | Description |
|---|---|
| R | Scalar Dot Product. |
R = dot(A, B) returns the scalar dot product of A and B.
For real vectors
$$\mathbf{a}$$and
$$\mathbf{b}$$of length
$$n$$:
$$\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} a_i b_i = a_1 b_1 + a_2 b_2 + \cdots + a_n b_n$$For complex vectors, the dot product is:
$$\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} \overline{a_i} b_i$$where
$$\overline{a_i}$$denotes the complex conjugate of
$$a_i$$A = [1 2 3;4 5 6;7 8 9];
B = [9 8 7;6 5 4;3 2 1];
R = dot(A, B)
R = dot(A, B, 2)
| Version | Description |
|---|---|
| 1.0.0 | initial version |