find the rank of a element in a an array of numbers

6 visualizaciones (últimos 30 días)
R yan
R yan el 21 de Abr. de 2014
Comentada: Azzi Abdelmalek el 21 de Abr. de 2014
Rank of 3 in [4 5 2 7 8] is two. Is there a matlab function for this? How to do it? thanks

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 21 de Abr. de 2014
v=[4 5 2 7 8]
idx=find(v==2)
  2 comentarios
R yan
R yan el 21 de Abr. de 2014
Editada: R yan el 21 de Abr. de 2014
thanks, but I want to know the position of the element on the sorted array

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by