In Matlab, I have created a matrix A with size (244x2014723)
and a matrix B with size (244x1)
I was able to calculate the correlation matrix using corr(A,B)
which yielded in a matrix of size 2014723x1
. So, every column of matrix A correlates with matrix B and gives one row value in the matrix of size 2014723x1
.
My question is when I ask for a covariance matrix using cov(A,B)
, I get an error saying A and B should be of same sizes. Why do I get this error? How is the method to find corr(A,B)
any different from cov(A,B)
?