how to select highest three maximum values from each row of an matrix

10 ビュー (過去 30 日間)
jaah navi
jaah navi 2019 年 3 月 28 日
コメント済み: madhan ravi 2019 年 3 月 28 日
A=rand(3,8) generates a matrix of 3 rows with 8 columns
could anyone help me how to select highest three maximum values from each row.
  1 件のコメント
madhan ravi
madhan ravi 2019 年 3 月 28 日
So all you expect is a person to do the work for you , won’t you put any work after asking 124 questions??

サインインしてコメントする。

採用された回答

Andrei Bobrov
Andrei Bobrov 2019 年 3 月 28 日
A=rand(3,8);
B = sort(A,2,'descend');
out = B(:,1:3);

その他の回答 (1 件)

madhan ravi
madhan ravi 2019 年 3 月 28 日
編集済み: madhan ravi 2019 年 3 月 28 日
Use the same answer I gave you in your previous question.
doc maxk % read it
  2 件のコメント
jaah navi
jaah navi 2019 年 3 月 28 日
i tried with the maxk command but its stating Undefined function or variable 'maxk'.
madhan ravi
madhan ravi 2019 年 3 月 28 日
Your question is answered here.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by