How to remove the row of a matrix that contains the lowest value
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
2 comentarios
Respuestas (1)
Walter Roberson
el 15 de Feb. de 2021
See the second output of mink() to get the indices that you can then use to delete with.
0 comentarios
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!