Documentation/SL/How Tos/Calc: funkcija SUMPRODUCT

From Apache OpenOffice Wiki
Jump to: navigation, search


SUMPRODUCT

Vrne vsoto produktov ustreznih elementov matrike.

Skladnja:

SUMPRODUCT(array1; array2; ... array30)

array1 to array30 are up to 30 arrays or ranges of the same size whose corresponding elements are to be multiplied.
SUMPRODUCT returns Calc sumproduct equation.png for the i elements in the arrays.
You can use SUMPRODUCT to calculate the scalar product of two vectors.


Napredne teme:
SUMPRODUCT evaluates each parameter array1 to array30 as an matrična formula, but does not need to be entered as an array formula. In other words it can be entered with the Enter key, rather than Cntrl-Shift-Enter. See the example below.
SUMPRODUCT can also be used to sum cells where a specified condition is true - glejte Pogojno štetje in seštevanje in spodnji primer.

Primer:

SUMPRODUCT(A1:B2; F1:G2)

vrne A1*F1 + B1*G1 + A2*F2 + B2*G2.

Napredne teme:

SUMPRODUCT(ABS(A1:A6))

when entered 'normally' (not as an matrična formula), returns the sum of the absolute values in cells A1:A6. SUMPRODUCT forces ABS(A1:A6) to be evaluated as an matrična formula.

SUMPRODUCT(A1:A6="red"; B1:B6="big"; C1:C6)

returns the sum of cells in C1:C6 whose corresponding entries in the A column are red and in the B column are big.

See also:

SUM, SUMIF, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2

Pogojno štetje in seštevanje

Kako uporabljamo matrike v programu Calc

Matrične funkcije

Personal tools