Borrar filtros
Borrar filtros

Calculating correlation matrix from time series in an array

8 visualizaciones (últimos 30 días)
Native
Native el 21 de Sept. de 2020
Comentada: Ameer Hamza el 21 de Sept. de 2020
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?

Respuestas (1)

Ameer Hamza
Ameer Hamza el 21 de Sept. de 2020
Editada: Ameer Hamza el 21 de Sept. de 2020
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 comentarios
Native
Native el 21 de Sept. de 2020
Editada: Native el 21 de Sept. de 2020
Yes they are stored as .mat files, I want to store the outputs separately as they were initially stored , just introduce the workspace variable of the correlation matrix.
Ameer Hamza
Ameer Hamza el 21 de Sept. de 2020
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by