Use of corrcoef function

조회 수: 1 (최근 30일)
Theodoros Stylianides
Theodoros Stylianides 2018년 1월 27일
답변: Abhishek Ballaney 2018년 1월 29일
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

답변 (1개)

Abhishek Ballaney
Abhishek Ballaney 2018년 1월 29일
https://in.mathworks.com/help/matlab/ref/corrcoef.html

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by