contextSum2

Syntax

contextSum2(X, Y)

Arguments

X and Y are vectors, matrices or tables.

Details

Get of positions that are not NULL in both X and Y, and calculate the sum of squares of the elements in X on these positions.

Return Value: DOUBLE type (regardless of the data types of X and Y)

Examples

contextSum2(1 2 3, 10 NULL 30);
// output
10

contextSum2(1 2 3, true false true);
// output
14

Related functions: contextCount, contextSum