Replace largest elements in matrix with NaN
Mostrar comentarios más antiguos
I would like to replace the n largest numbers in first column with NaN in a matrix.
For example for value n = 3 for matrix A output will be B :
A =
17 2
5 68
79 28
900 17
77 63
90 87
B =
17 2
5 68
NaN 28
NaN 17
77 63
NaN 87
What will be the code for this?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre NaNs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!