maximum number and indexing
Mostrar comentarios más antiguos
how can i find maximun number from an array for example .a=[2,44,6,77,3,9],how can i find max 2 numbers which are ,44 and 77 from a single command ? and how to know there index .thanks
Respuestas (1)
madhan ravi
el 3 de Abr. de 2019
maxk(a,2)
7 comentarios
asad jaffar
el 3 de Abr. de 2019
madhan ravi
el 3 de Abr. de 2019
Editada: madhan ravi
el 3 de Abr. de 2019
[Values,Indices] = sort(a,'descend')
[Values(1:2);Indices(1:2)]
asad jaffar
el 3 de Abr. de 2019
madhan ravi
el 3 de Abr. de 2019
I have answered the question you originally asked.
asad jaffar
el 3 de Abr. de 2019
Walter Roberson
el 3 de Abr. de 2019
You should create a different Question for this.
Jan
el 5 de Abr. de 2019
@asad: If madhan's answer solves your problem, be so kind to accept it.
Categorías
Más información sobre Point Cloud Processing 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!