Groupsummary on timetable with cell/matrix data
Afficher commentaires plus anciens
Hello,
Is it possible with groupsummary to apply aggregation function to cell or matrix data?
For example, if I want to average the "Matrix" every 1s with the following timetable example:
t Angle Matrix
________ _____ ______________
0.2 sec 180.4 {53×53 double}
0.4 sec 180.4 {53×53 double}
0.6 sec 180.4 {53×53 double}
0.8 sec 180.4 {53×53 double}
1 sec 180.4 {53×53 double}
1.2 sec 180.4 {53×53 double}
1.4 sec 180.4 {53×53 double}
1.6 sec 180.4 {53×53 double}
1.8 sec 180.4 {53×53 double}
Thank you
Gregory
4 commentaires
Gregory Bolard
le 23 Fév 2021
Image Analyst
le 23 Fév 2021
I don't see how groupsummary() applies. Which column is your group? It looks like every row in your table is a distinct group. For simplicity I'd just do (untested)
for k = 1 : size(yourTable, 1)
thisMatrix = table{k, 3};
means(k) = mean(thisMatrix(:));
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!