How to remove the row of a matrix that contains the lowest value
4 次查看(过去 30 天)
显示 更早的评论
Hi, I have a 5x3 matrix and wish to remove the 2 rows that contain the lowest value in the 3rd column. For example, if the matrix was as shown below, the second and last rows would be deleted, since they contain the smallest values in the final column (0.096177... and 0.095584...)
Any help would be greatly appreciated!
1.371000000000000 1.980000000000000 0.097003992224313
0.763000000000000 1.580000000000000 0.096177656638105
3.867000000000000 1.794000000000000 0.104624286446469
2.439000000000000 2.387000000000000 0.099416976773999
1.136000000000000 3.884000000000000 0.095584923786334
回答(1 个)
Walter Roberson
2021-2-15
See the second output of mink() to get the indices that you can then use to delete with.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!