How to find row wise correlation coefficients and p values for two matrices?
Show older comments
I have two matrices, A and B. Both A and B have 3420 rows and 29 columns. I want the correlation coefficients and P values of the correspoding rows of A and B.
I need a result of P value and R value as 3420 rows and 1 column. How to get to it?
I tried the following code:
[R,P]=corr(A',B');
But the result of R and P is a 3420x3420 matrix. How to get R and P as 3420x1 vector for the row wise correlation coefficients between these two matrices A and B?
Accepted Answer
More Answers (0)
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!