wsum

Syntax

wsum(X, Y)

Arguments

X / Y can be a scalar, vector, matrix or table.

Details

Return the inner product of two vectors with the same length.

Please note that the data type of the result is DOUBLE, even if both X and Y are integers.

Examples

wsum(7 8 9, 1 2 3);
// output
50
// 7*1 + 8*2 + 9*3 = 50

Related function: wavg