Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
Loading...
Searching...
No Matches
Functions
calculateCORR.m File Reference

Function to caluclate the Pearson correlation coefficient. More...

Functions

function calculateCORR (in x, in y)
 Function to caluclate the Pearson correlation coefficient.
 

Detailed Description

Function to caluclate the Pearson correlation coefficient.

Author
Marlies Nitschke
Date
January, 2021

Function Documentation

◆ calculateCORR()

function calculateCORR ( in  x,
in  y 
)

Function to caluclate the Pearson correlation coefficient.

The Pearson correlation coefficient does not detect systematic biases. It quantifies the strength of linear combinaton and ranges from -1 indicating perfect negative correlaton to 1 indicating perfect positive correlation.

\( r= \displaystyle\frac{\displaystyle\sum_{i=1}^{N}(x_i - \bar{x})(y_i - \bar{y}) }{\displaystyle\sqrt{\sum_{i=1}^{N}(x_i - \bar{x})^2} \sqrt{\sum_{i=1}^{N}(y_i - \bar{y})^2}} \)

out_r = calculateCORR(x, y)
function calculateCORR(in x, in y)
Function to caluclate the Pearson correlation coefficient.
Parameters
xDouble Vector: x signal
yDouble Vector: y signal
Return values
out_rDouble: Pearson correlation coefficient which is between -1 and 1