Groupsummary on timetable with cell/matrix data
Show older comments
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 Comments
Gregory Bolard
on 23 Feb 2021
Image Analyst
on 23 Feb 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
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!