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!