How does the Matlab function corr(X,Y) work internally?

308 Views Asked by At

I know that the function corr(X,Y) computes the correlation coefficient between pairs of columns in two matrices X and Y. I am having a hard time understanding how this function works under the hood. Could anyone help me to understand what matlab is actually doing once it receives two matrices (what type of math is this function doing)?

1

There are 1 best solutions below

2
souty On

The code of corr.m is largely accessible. Type edit corr at the command line to open the corresponding m-file and to study the function's "inner" workings...