correl
Returns the correlation coefficient of the given curve vectors.
Syntax
correl(vec_1, vec_2)
Argument
- vec_1
- The first vector.
- vec_2
- The second vector.
Example
Templex Expression | Result |
---|---|
{correl({0,1},{1,0})} |
-1 |
{correl(p1w1c1.y,p1w1c2.y)} |
0.4591 |
Comments
The correlation coefficient is calculated according to the following equation:
If the given vectors have a different number of data points, an error is returned.
If either vector is empty, or if the standard deviation of their values is equal to 0, an error is returned.