Use of corrcoef function
1 view (last 30 days)
Show older comments
Hello all,
I might be asking an arbitrary one today.
I am trying to familiarise myself to the use of corrcoef function so here it goes: Assume N is a given matrix and X & Y correspond to different columns (N(:,1) and N(:,2) in that array:
I'm struggling to understand what corrcoef (x y) and corrcoef(N) result to.
The code (an extract) i use for corrcoef (x y) is below:
for i=2:SampleLength;
for j=2:SampleLength;
X=N([a:b],i); %a , b define specific boundaries
Y=N([a:b],j)
[Correlation,Significance]=corrcoef(X,Y);
test(i-1,j-1)=Correlation(2,1);
sign(i-1,j-1)=Significance(2,1);
end
end
This extracts the coefficients and p-values.
But in the same time i can just run :
[Correlation,Significance]=corrcoef(N)
but end up with a different correlation matrix.
Any input on this?
Thanks in advance
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!