maximum number and indexing

6 次查看(过去 30 天)
asad jaffar
asad jaffar 2019-4-3
评论: Jan 2019-4-5
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

回答(1 个)

madhan ravi
madhan ravi 2019-4-3
maxk(a,2)
  7 个评论
Jan
Jan 2019-4-5
@asad: If madhan's answer solves your problem, be so kind to accept it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by