Table Of Contents

dot

Version:
    Last Modified: January 9, 2017

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

    Syntax

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

    Inputs

    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.

    Outputs

    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


    Recently Viewed Topics