How do I find the correlation coefficient between two vector arrays?

Hi guys, I transformed 2 matrices into vector arrays, so like each vector has 1 column and 2850 rows. How do I find the correlation coefficient between the two vector arrays?
I tried to use corrcoef, but I don't think it works in this case yes?
Thank you!

回答(1 个)

R = corrcoef(A,B)
Please read about corrcoef.

3 个评论

are you sure this works for vectors? My results gathered from it is always 1 or 0.99 which is really rare
I also have the same question, I have two column vectors, When I use corrcoef it gives me 1 but when I use xcov it give me a logical answer, which one is correct?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

提问:

2016-8-23

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by