Finding the pearson correlation coefficient

1 view (last 30 days)
I have an array A which is a 139x120 double and an array B which is a 1x120 double. For each row of A, I want to find the Pearson correlation coefficient for the i th column of A with the i th column of B, ending up with an array that is 139x120. There are no NaN values in any of my arrays. I have tried using corr, but have been unable to get what I want. How do I go about doing this?
Thank you in advance.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices 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!