Groupsummary on timetable with cell/matrix data
Mostrar comentarios más antiguos
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 comentarios
Gregory Bolard
el 23 de Feb. de 2021
Image Analyst
el 23 de Feb. de 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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!