how to find correlation of a row with all the other rows of a matrix ?

3 vues (au cours des 30 derniers jours)
Rohit P
Rohit P le 7 Oct 2022
Commenté : Rohit P le 10 Oct 2022
Hello guys,
i am stuck at a problem.. i have 30000x8 matrix.. i want to find correlation coefficient of each row in the matrix with all the other rows in the matrix. for Ex- third row correlation with all its previous as well as succeeding rows.. how can i achieve this?.. please help.
Thank You in Advance

Réponse acceptée

Bruno Luong
Bruno Luong le 7 Oct 2022
Modifié(e) : Bruno Luong le 7 Oct 2022
If you have the right toolbox, use https://fr.mathworks.com/help/stats/corr.html
  5 commentaires
Bruno Luong
Bruno Luong le 7 Oct 2022
C = corrcoef(A.')
C(i,j) provides you the correlation between row i and row j of A.
C(i,:) is the correlation of row i to all other rows.
You need 7 Gb of RAM to store C if your A matrix is 30000 x 8.
Rohit P
Rohit P le 10 Oct 2022
Ok..Thats exactly what i wanted.. Thank You.!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by