How to remove the row of a matrix that contains the lowest value

조회 수: 4 (최근 30일)
Oscar Zampi
Oscar Zampi 2021년 2월 15일
답변: Walter Roberson 2021년 2월 15일
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
Walter Roberson 2021년 2월 15일
See the second output of mink() to get the indices that you can then use to delete with.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by