Calculating correlation matrix from time series in an array
8 次查看(过去 30 天)
显示 更早的评论
I have a cell array with 164 entities, each with an entry of 193X1 time points. I need to create a correlation matrix of the dimension 164X164 with pearson correlations. How can I go about doing that?
0 个评论
回答(1 个)
Ameer Hamza
2020-9-21
编辑:Ameer Hamza
2020-9-21
Use corrcoef() but first convert the matrix to correct form
C = % 164 elements cell array
Cv = [C{:}]; % creating a matrix
coff_matrix = corrcoef(Cv); % 164x164 matrix
4 个评论
Ameer Hamza
2020-9-21
Without more information about the content of each mat file (i.e., names of variables) and how they are stored, it is difficult to give an exact solution.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!