corr
Syntax
corr(X,Y)
Details
Calculate the correlation of X and Y.
When the variance of X or Y is less than 10^-12, the variance is considered 0, and the result of the correlation calculation will be NULL.
Parameters
X and Y are vectors/matrices/tables of the same size. If X is a table, only the numeric and Boolean values are calculated.
Returns
A scalar/vector/table of type DOUBLE.
Examples
x = 7 4 5 8 9 3 3 5 2 6 12 1 0 -5 32
y=1.1 7 8 9 9 5 4 8.6 2 1 -9 -3 5 8 13
corr(x,y);
// output: 0.238769
