Extract data from multidimensional cell array
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Esra Kaya
le 3 Août 2016
Réponse apportée : Esra Kaya
le 4 Août 2016
In a for loop, I made some calculations and obtained a 50x1 cell array and every cell has :x9 matrices. object count being ':' means it is changeable. 9 is the number of properties and I want to calculate the mean value of every property. I could not take the data from the cell array. Can you please help me? Thanks in advance.
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 3 Août 2016
Modifié(e) : Azzi Abdelmalek
le 3 Août 2016
yourcellarray=arrayfun(@(x) randi(10,randi(20),9),1:50,'un',0) %--Example-----
out=cellfun(@(x) mean(x,2),yourcellarray,'un',0)
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!