Navigation

Operators and Keywords

Function List:

C++ API

: dot (x, y, dim)

Compute the dot product of two vectors.

If x and y are matrices, calculate the dot products along the first non-singleton dimension.

If the optional argument dim is given, calculate the dot products along this dimension.

This is equivalent to sum (conj (X) .* Y, dim), but avoids forming a temporary array and is faster. When X and Y are column vectors, the result is equivalent to X' * Y.

See also: cross, divergence.

Package: octave