rowCovar

Syntax

rowCovar(X, Y)

Please see rowFunctions for the parameters and calculation rules.

Details

Calculate the covariance between X and Y by row and return a vector with the same number of rows of X.

Examples

m1=matrix(2 8 9 12, 9 14 11 8,-3 NULL NULL 9)
m2=matrix(11.2 3 5 9, 7 -10 8 5,17 12 18 9)
rowCovar(m1, m2)
// output
[-29.7333, -39, 3, 3.3333]

Related function: covar