I have 2 matrices of dim 15*3 and 10*3 . I want to find their correlation (Pearson coefficient) between the 2 matrices. I used the command
result=corr2(A,B)
But i got the error stating that A and B of same size.
Can anyone tell me what is wrong in that command. Is there any other way to find correlation between 2 different dimension matrices?
For
r = corr2(A,B)(documentation):it returns the correlation coefficient r between A and B, where A and B are matrices or vectors of the same size. r is a scalar double.
If you still want to use
corr2, you can do like:Solve: for matrices of different dimensions, you should use
xcorr2:C = xcorr2(A, B)documentation: