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 Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by