Filter löschen
Filter löschen

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

7 Ansichten (letzte 30 Tage)
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 Kommentar
madhan ravi
madhan ravi am 28 Mär. 2019
So all you expect is a person to do the work for you , won’t you put any work after asking 124 questions??

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 28 Mär. 2019
A=rand(3,8);
B = sort(A,2,'descend');
out = B(:,1:3);

Weitere Antworten (1)

madhan ravi
madhan ravi am 28 Mär. 2019
Bearbeitet: madhan ravi am 28 Mär. 2019
Use the same answer I gave you in your previous question.
doc maxk % read it
  2 Kommentare
jaah navi
jaah navi am 28 Mär. 2019
i tried with the maxk command but its stating Undefined function or variable 'maxk'.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by