Azzera filtri
Azzera filtri

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

7 visualizzazioni (ultimi 30 giorni)
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 Commento
madhan ravi
madhan ravi il 28 Mar 2019
So all you expect is a person to do the work for you , won’t you put any work after asking 124 questions??

Accedi per commentare.

Risposta accettata

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

Più risposte (1)

madhan ravi
madhan ravi il 28 Mar 2019
Modificato: madhan ravi il 28 Mar 2019
Use the same answer I gave you in your previous question.
doc maxk % read it

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by