DOT_PRODUCT

Platform

x64, Win32, .NET

Purpose

To get the dot-product of two numeric or logical vectors.

Class

Transformational function.

Syntax

FUNCTION DOT_PRODUCT(VECTOR_A, VECTOR_B)

Description

The type of the result is a scalar numeric (integer, real, or complex) or logical type and is the same type as each element of the one-dimensional array VECTOR_A.

VECTOR_A and VECTOR_B are one-dimensional arrays with the same length. VECTOR_A is of numeric type or logical type. If VECTOR_A is numeric then VECTOR_B must be numeric (though perhaps not the same type) and if VECTOR_A is logical then VECTOR_B must be logical.

Return value

If VECTOR_A is integer or real then the result is the inner product of the two arrays (i.e. the sum of the products of corresponding elements).

If VECTOR_A is complex then its conjugate is used in the inner product and the result is the complex value that is the sum of the terms. If VECTOR_B = VECTOR_A then the imaginary part of the result will be approximately zero.

If VECTOR_A is logical then the result is the same as ANY(VECTOR_A .AND. VECTOR_B).

If the vectors have size zero then the result is zero or false.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited