Effacer les filtres
Effacer les filtres

Extracting elements from cell array of matrices

1 vue (au cours des 30 derniers jours)
Hau Kit Yong
Hau Kit Yong le 16 Oct 2018
Commenté : madhan ravi le 16 Oct 2018
Say I have a 101x101 cell array, where each element is a 3x3 matrix. How can I extract the (1,1) element of each of the 101x101 matrices in the cell array, to form a 101x101 matrix of values?
Edit: I've managed to extract the data using the line as follows:
arrayfun(@(x)x{:}(1,1),mycellarray)

Réponses (1)

madhan ravi
madhan ravi le 16 Oct 2018
Modifié(e) : madhan ravi le 16 Oct 2018
matrix{1,1}
You can convert the whole matrix to matrix values as such :
cell2mat(matrix) %assuming matrix contains doubles

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by