Extract data from multidimensional cell array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Esra Kaya
am 3 Aug. 2016
Beantwortet: Esra Kaya
am 4 Aug. 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 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 3 Aug. 2016
Bearbeitet: Azzi Abdelmalek
am 3 Aug. 2016
yourcellarray=arrayfun(@(x) randi(10,randi(20),9),1:50,'un',0) %--Example-----
out=cellfun(@(x) mean(x,2),yourcellarray,'un',0)
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!