dot

Version:

Computes the dot product of two scalars or arrays of any dimensions.

Syntax

c = dot(a, b)
c = dot(a, b, dim)

a

Scalar or array of any dimensions of single-precision, or double-precision numbers.

b

Scalar or array of any dimensions of single-precision, or double-precision numbers. b must be the same size as a.

dim

Dimension in which MathScript computes the dot product. dim can be in a range of 1 to the maximum supported array dimension (32). If you do not specify dim, the function works with the first dimension whose size is not equal 1.

c

Dot product of a and b. c is a scalar or an array any dimensions. If a and b are scalars or arrays of single-precision, c returns a single-precision scalar or array, otherwise c returns a double-precision scalar or array. If a and b are standard empty arrays, c returns 0.

A = [1, 2, 3]
B = [0, -3, 2]
C = dot(A, B)

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported