how to compute correlation coeffcient?

2 views (last 30 days)
Aidy
Aidy on 11 Dec 2013
Commented: Aidy on 11 Dec 2013
hi,
I have 2 vectors A and B
A=[0.0252653330054456 0.0252653330054481 0.0252653330347238 0.0252656701005406]
B=[1.83588753363655 1.83588753363655 1.83588753363753 1.83588754495825]
I want to get a similarity value between 0 and 1, using a correlation coefficient. Is their any function in Matlab to get it?
cheers

Answers (1)

the cyclist
the cyclist on 11 Dec 2013
Typing
docsearch correlation
turns up the corrcoef() function as the first hit.
doc corrcoef
for details on this function, to see if it does what you need.
  1 Comment
Aidy
Aidy on 11 Dec 2013
no, the pearson corr eoeff gives between -1 and 1, not 0 and 1. And of course, I looked at the doc.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!