How to add the rows if it is same.

2 次查看(过去 30 天)
I am trying to add the rows that have same game column. For example, for same rows like game value =0, the output should be 0.633+13.7167+16.3333. How can we do that?

采纳的回答

Simon Chan
Simon Chan 2021-12-25
Put your data into a table with Variable Names 'Game' and 'Time', then use function groupsummary to sum up the values
groupsummary(T,"Game","sum") % T is your table

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Just for fun 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by