Sort a table by two conditions when one column is not unique
4 次查看(过去 30 天)
显示 更早的评论
I need to sort this table by two conditions. I need the maximum F_H_max per POSITION. However the POSITION column is not unique. I also need to retain the vertical coordinate for each max value.
0 个评论
回答(1 个)
Steven Lord
2021-7-22
Do you need to sort the table or do you need the maximum value of F_H_max for each value of POSITION? Those are two different things. For the former use sortrows, specifically the "Sort Rows of Table by Variables" example on the documentation page. For the latter use groupsummary, as per the "Summary Statistics" example on the documentation page.
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!