Groupsummary on timetable with cell/matrix data
이전 댓글 표시
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
Gregory Bolard
2021년 2월 23일
Image Analyst
2021년 2월 23일
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!